/* Shared Custom Searchable Select Styles */
.custom-select-wrapper {
    position: relative;
    width: 100%;
}

.custom-select-trigger {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-family: inherit;
    min-height: 40px;
}

body.light-mode .custom-select-trigger {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0, 0, 0, 0.15);
    color: var(--text-main);
}

.custom-select-trigger:hover,
.custom-select-trigger.active {
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.3);
    outline: none;
}

.custom-select-trigger:focus {
    border-color: #8b5cf6;
    background: rgba(0, 0, 0, 0.3);
    outline: none;
    box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.4);
}

body.light-mode .custom-select-trigger:hover,
body.light-mode .custom-select-trigger.active {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 2px rgba(59, 75, 226, 0.15);
}

.custom-select-trigger span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
}

/* Appended to Body */
.custom-select-dropdown {
    position: absolute;
    background: rgba(24, 24, 27, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    z-index: 9999;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    padding: 8px;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(-5px);
    pointer-events: none;
    transition: opacity 0.2s, transform 0.2s;
    font-family: 'Outfit', sans-serif;
}

body.light-mode .custom-select-dropdown {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.custom-select-dropdown.open {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.custom-select-search {
    width: 100%;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 14px;
    color: white;
    margin-bottom: 8px;
    border-radius: 8px;
    outline: none;
    font-family: inherit;
    font-size: 0.9rem;
    flex-shrink: 0;
}

body.light-mode .custom-select-search {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: var(--text-main);
}

.custom-select-search:focus {
    border-color: var(--primary);
}

.custom-select-options {
    max-height: 250px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

/* Scrollbar for options */
.custom-select-options::-webkit-scrollbar { width: 6px; }
.custom-select-options::-webkit-scrollbar-track { background: transparent; }
.custom-select-options::-webkit-scrollbar-thumb { background: rgba(150,150,150,0.3); border-radius: 6px; }

.custom-option {
    padding: 10px 12px;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.9rem;
    color: #f8fafc;
    transition: all 0.2s;
}

body.light-mode .custom-option {
    color: var(--text-main);
}

.custom-option:hover {
    background: rgba(255, 255, 255, 0.1);
}

body.light-mode .custom-option:hover {
    background: rgba(0, 0, 0, 0.05);
}

.custom-option.selected {
    background: rgba(93, 107, 248, 0.2);
    color: #a5b4fc;
    font-weight: 500;
}

.custom-option.highlighted {
    background: rgba(139, 92, 246, 0.35);
    color: white;
}

body.light-mode .custom-option.highlighted {
    background: rgba(59, 75, 226, 0.15);
    color: var(--primary);
}

body.light-mode .custom-option.selected {
    background: rgba(59, 75, 226, 0.1);
    color: var(--primary);
}

body.light-mode .custom-select-trigger:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 75, 226, 0.25);
}
