/* --- Base Dropdown Styles --- */
.custom-dropdown-options {
    list-style: none;
    margin: 0;
    padding: 0;
}

.custom-dropdown-options li {
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

.custom-dropdown-options li:hover {
    background-color: #f3f4f6;
}

.custom-dropdown-options .no-results {
    padding: 0.5rem 1rem;
    color: #6b7280;
    cursor: default;
}

.dropdown-arrow {
    transition: transform 0.3s ease;
}

.dropdown-arrow.open {
    transform: rotate(-90deg);
}

.custom-dropdown-menu {
    position: absolute;
    width: 100%;
    margin-top: 0.25rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0.2s;
    right: 0;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: #fff;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
}

.custom-dropdown-menu.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s 0s;
    z-index: 50;
}

/* --- Multi-select & Pill Styles --- */
@keyframes fadeInPill {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.item-pill {
    display: flex;
    align-items: center;
    background-color: #CC5500;
    color: white;
    border-radius: 9999px;
    padding: 2px 4px 2px 8px;
    font-size: 0.75rem;
    line-height: 1.25;
    animation: fadeInPill 0.2s ease-out;
    white-space: nowrap;
}

.pill-close-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 4px;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.1);
    border: none;
    color: white;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s ease-in-out;
    line-height: 1;
}

.pill-close-btn:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

.custom-dropdown-options li.selected {
    background-color: #fdddca;
    font-weight: 600;
}

.multi-select-search-input {
    flex-grow: 1;
    border: none;
    outline: none;
    padding: 4px 6px;
    background-color: transparent;
    min-width: 150px;
}
.multi-select-search-input::placeholder {
    color: #9ca3af;
}

/* --- Staged Courses List --- */
#staged-courses-container {
    overflow: visible;
}

.staged-courses-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.25rem;
    padding: 0 4px;
}
.remove-all-btn {
    background: none;
    border: none;
    color: #CC5500;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    padding: 4px;
}
.remove-all-btn:hover {
    text-decoration: underline;
}

.staged-course-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.25rem;
    border-bottom: 1px solid #e5e7eb;
}

.staged-course-item {
    display: inline-flex;
    align-items: center;
    background-color: #e5e7eb;
    color: #374151;
    padding: 0.3rem 0.4rem 0.3rem 0.8rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.staged-pill-remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: none;
    background-color: #d1d5db;
    color: #4b5563;
    cursor: pointer;
    font-size: 0.875rem;
    line-height: 1;
    transition: background-color 0.2s, color 0.2s;
}

.staged-pill-remove-btn:hover {
    background-color: #9ca3af;
    color: #1f2937;
}

/* --- Equivalency Display Styles --- */
.total-savings-box {
    background-color: #1f2937;
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    text-align: right;
}

.total-savings-box span {
    font-size: 0.75rem;
    display: block;
    text-transform: uppercase;
    color: #9ca3af;
    font-weight: 600;
}

.total-savings-box strong {
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1;
}

.equivalent-card {
    background-color: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
}

.equivalent-card h3 {
    font-size: 1.125rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.details-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.875rem;
    color: #4b5563;
    padding-bottom: 0.5rem;
    margin-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
    min-height: 20px;
}

.details-bar.transfer-details {
    justify-content: flex-end;
}

.equivalency-info {
    font-size: 0.875rem;
    color: #374151;
}

.equivalency-info span {
    display: block;
    margin-bottom: 0.25rem;
    color: #6b7280;
}

.equivalency-info strong {
    display: block;
    padding-left: 1rem;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.5;
}

.savings-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e5e7eb;
    padding-top: 0.75rem;
    margin-top: 0.75rem;
}

.savings-bar span {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563;
}

.savings-amount-box {
    background-color: #16a34a;
    color: white;
    font-weight: 700;
    font-size: 1rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    line-height: 1.25;
}

.duplicate-card {
    background-color: #fef2f2; /* Red-50 */
    border: 1px solid #fca5a5; /* Red-300 */
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.duplicate-card span {
    font-weight: 600;
    color: #b91c1c; /* Red-700 */
}

.duplicate-card .duplicate-amount {
    font-size: 1.125rem;
}


/* --- Score Dropdown --- */
.score-dropdown {
    position: relative;
    width: 130px;
}

.score-display {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background-color: #fff;
    cursor: pointer;
    font-size: 0.875rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    gap: 0.5rem; /* consistent spacing between label and arrow */
    min-width: 140px;
    width: auto;
}

.score-display .placeholder {
    color: #6b7280;
}

.score-dropdown .custom-dropdown-options li {
    text-align: right;
    padding-right: 1rem;
}

.score-display .dropdown-arrow {
    width: 1.25rem;      /* visual size */
    height: 1.25rem;
    margin-left: auto;   /* push arrow to the right */
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;      /* default arrow color (gray) */
    transition: transform 0.2s ease, color 0.2s ease;
}

/* Make sure the injected SVG fills the wrapper and uses currentColor */
.score-display .dropdown-arrow svg {
    width: 100% !important;
    height: 100% !important;
    stroke: currentColor !important;
    fill: none !important;
}

/* Keep the rotated/open style consistent */
.score-display .dropdown-arrow.open {
    transform: rotate(-90deg);
}

/* Ensure other dropdown arrows don't get unintentionally recolored */
.custom-dropdown .dropdown-arrow,
.multi-select-dropdown .dropdown-arrow {
    color: #6b7280;
}