/* ws-custom-select — filterable combobox dropdown */

.ws-custom-select {
    position: relative;
    width: 100%;
}

.ws-custom-select__trigger {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    padding: 0.8rem 0.35rem 0.8rem 1rem;
    border-radius: 16px;
    background: #fff;
    border: 1px solid rgba(12, 18, 34, 0.08);
    box-shadow: 0 8px 24px rgba(12, 18, 34, 0.04);
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        border-radius 0.2s ease;
}

.ws-custom-select:focus-within .ws-custom-select__trigger,
.ws-custom-select.is-open .ws-custom-select__trigger {
    border-color: rgba(212, 175, 55, 0.45);
    box-shadow:
        0 12px 28px rgba(184, 146, 46, 0.12),
        0 0 0 3px rgba(212, 175, 55, 0.12);
}

.ws-custom-select.is-open .ws-custom-select__trigger {
    border-bottom-color: transparent;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.ws-custom-select__icon {
    flex-shrink: 0;
    color: var(--ws-gold-bright);
    font-size: 1.15rem;
}

.ws-custom-select__input {
    width: 100%;
    min-width: 0;
    border: 0;
    background: transparent;
    color: #1a2030;
    font-size: 0.95rem;
    font-weight: 500;
    outline: none;
}

.ws-custom-select__input::placeholder {
    color: #9aa3b2;
    font-weight: 400;
}

.ws-custom-select__toggle {
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.15rem;
    height: 2.15rem;
    margin-left: 0.15rem;
    border: 0;
    border-radius: 12px;
    background: rgba(212, 175, 55, 0.12);
    color: var(--ws-gold-deep);
    font-size: 1.2rem;
    cursor: pointer;
    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.ws-custom-select__toggle:hover,
.ws-custom-select__toggle:focus-visible {
    background: rgba(212, 175, 55, 0.22);
    color: var(--ws-gold-darker);
}

.ws-custom-select.is-open .ws-custom-select__toggle {
    background: rgba(212, 175, 55, 0.24);
    transform: rotate(180deg);
}

.ws-custom-select__menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 20;
    margin: -1px 0 0;
    max-height: min(18rem, 42vh);
    overflow-y: auto;
    padding: 0.35rem;
    border: 1px solid rgba(212, 175, 55, 0.45);
    border-top: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: 0 0 16px 16px;
    background: #fff;
    box-shadow:
        0 18px 40px rgba(12, 18, 34, 0.14),
        0 0 0 3px rgba(212, 175, 55, 0.12);
    scrollbar-width: thin;
}

.ws-custom-select__menu[hidden] {
    display: none !important;
}

.ws-custom-select__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.7rem 0.8rem;
    border: 0;
    border-radius: 12px;
    background: transparent;
    color: #1a2030;
    text-align: left;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease;
}

.ws-custom-select__option:hover,
.ws-custom-select__option:focus-visible,
.ws-custom-select__option.is-highlighted {
    background: rgba(212, 175, 55, 0.12);
    color: var(--ws-gold-darker);
}

.ws-custom-select__option[hidden] {
    display: none !important;
}

.ws-custom-select__option-label {
    min-width: 0;
    font-size: 0.92rem;
    font-weight: 600;
    line-height: 1.35;
}

.ws-custom-select__option-meta {
    flex-shrink: 0;
    padding: 0.18rem 0.5rem;
    border-radius: 999px;
    background: rgba(12, 18, 34, 0.06);
    color: #6b7488;
    font-size: 0.74rem;
    font-weight: 700;
}

@media (prefers-reduced-motion: reduce) {
    .ws-custom-select__trigger,
    .ws-custom-select__toggle {
        transition: none;
    }
}
