/* ═══════════════════════════════════════════════════════════════════════════
   Custom select (replaces native dropdown list styling)
   ═══════════════════════════════════════════════════════════════════════════ */

.ks-select {
    position: relative;
    width: 100%;
}

.ks-select__native {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.ks-select__trigger {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    width: 100%;
    min-height: 42px;
    padding: 0.45rem 0.85rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.88rem;
    font-weight: 500;
    font-family: 'Manrope', system-ui, sans-serif;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.ks-select__trigger:hover {
    border-color: rgba(255, 255, 255, 0.16);
    background: rgba(255, 255, 255, 0.06);
}

.ks-select__trigger:focus-visible {
    outline: none;
    border-color: rgba(225, 29, 72, 0.55);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.18);
}

.ks-select.is-open .ks-select__trigger {
    border-color: rgba(225, 29, 72, 0.45);
    box-shadow: 0 0 0 3px rgba(225, 29, 72, 0.12);
}

.ks-select__value {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ks-select__chevron {
    flex-shrink: 0;
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.4);
    transition: transform 0.2s ease, color 0.15s ease;
}

.ks-select.is-open .ks-select__chevron {
    transform: rotate(180deg);
    color: #fda4af;
}

.ks-select__menu {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 120;
    pointer-events: auto;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: #121212;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    max-height: 240px;
    overflow-y: auto;
    overscroll-behavior: contain;
}

.ks-select__menu[hidden] {
    display: none !important;
}

/* Portaled to body — escapes overflow / sibling overlap on browse panel */
.ks-select__menu--portal {
    position: fixed !important;
    z-index: 10050 !important;
    pointer-events: auto !important;
}

.ks-select__option {
    display: block;
    width: 100%;
    padding: 0.5rem 0.65rem;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: rgba(255, 255, 255, 0.82);
    font-size: 0.88rem;
    font-weight: 500;
    font-family: 'Manrope', system-ui, sans-serif;
    text-align: left;
    cursor: pointer;
    transition: background 0.12s ease, color 0.12s ease;
}

.ks-select__option:hover,
.ks-select__option:focus-visible {
    background: rgba(180, 18, 42, 0.22);
    color: #fff;
    outline: none;
}

.ks-select__option.is-active {
    background: rgba(180, 18, 42, 0.32);
    color: #fda4af;
    font-weight: 600;
}

.ks-select__menu::-webkit-scrollbar {
    width: 6px;
}

.ks-select__menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 999px;
}
