/* Multi-Select Styles */
.multi-select {
    position: relative;
    width: 300px;
    max-width: 100%;
}

.select-toggle {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: var(--bg-card);
    -webkit-user-select: none;
    user-select: none;
}

.select-toggle .arrow {
    width: 16px;
    height: 16px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    margin-left: 8px;
    color: transparent;
    /* Hide text fallback */
    overflow: hidden;
    transition: transform 0.3s;
}

.multi-select.open .arrow,
.select-toggle.active .arrow {
    transform: rotate(180deg);
}

.select-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    margin-top: 4px;
    padding: 8px 0;
}

.select-dropdown.hidden {
    display: none;
}

.select-option {
    padding: 8px 12px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.select-option:hover {
    background: var(--bg-card-hover);
}

.select-option input[type="checkbox"] {
    accent-color: var(--accent-primary);
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.select-actions {
    padding: 8px 12px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    margin-bottom: 4px;
}

.select-actions button {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 0;
}

.select-actions button:hover {
    text-decoration: underline;
}

/* ===== SEARCHABLE SELECT STYLES ===== */
.searchable-select {
    position: relative;
    width: 300px;
}

.searchable-select input {
    width: 100%;
    cursor: text;
    padding-right: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a1a1aa' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
}

.searchable-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    max-height: 350px;
    overflow-y: auto;
    margin-top: 4px;
}

.searchable-dropdown.hidden {
    display: none;
}

.searchable-option {
    padding: 10px 14px;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-primary);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.searchable-option:hover,
.searchable-option.highlighted {
    background: var(--bg-card-hover);
}

.searchable-option.selected {
    background: var(--accent-primary);
    color: white;
}


.searchable-option .star {
    color: var(--warning);
    font-size: 0.85rem;
}

.searchable-no-results {
    padding: 12px 14px;
    color: var(--text-muted);
    text-align: center;
    font-size: 0.9rem;
}

/* Filter row layout */
.filter-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.btn-nav {
    padding: 10px 14px;
    height: 42px;
}

/* Favorite button styling */
.favorite-star {
    color: var(--warning);
}

#toggleFavoriteBtn.btn-favorite-active {
    background: var(--bg-card);
    border-color: var(--warning);
    color: var(--text-primary);
}

#toggleFavoriteBtn.btn-favorite-active:hover {
    background: var(--bg-card-hover);
}