/* ===== CUSTOM SELECT (dropdown premium) ===== */
.cs {
    position: relative;
    width: 100%;
}

/* Nativo escondido, mas presente para valor/submit/acessibilidade de fallback */
.cs-native {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
    opacity: 0;
    pointer-events: none;
}

.cs-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: clamp(14px, 4vw, 16px);
    background: #ffffff;
    border: 2px solid #e0e0e0;
    border-radius: clamp(10px, 2.5vw, 12px);
    font-family: 'Poppins', sans-serif;
    font-size: clamp(0.95rem, 3.5vw, 1.05rem);
    color: #1a1a1a;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.cs-trigger:hover {
    border-color: #c9c9c9;
}

.cs.open .cs-trigger,
.cs-trigger:focus-visible {
    outline: none;
    border-color: var(--primary-yellow);
    box-shadow: 0 0 0 3px rgba(245, 197, 24, 0.18);
}

.cs-value {
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.cs-value-placeholder {
    color: #9a9a9a;
}

.cs-arrow {
    flex: 0 0 auto;
    width: 11px;
    height: 11px;
    border-right: 2.5px solid #6b6b6b;
    border-bottom: 2.5px solid #6b6b6b;
    transform: rotate(45deg) translate(-2px, -2px);
    transition: transform 0.25s ease;
}

.cs.open .cs-arrow {
    transform: rotate(-135deg) translate(-2px, -2px);
}

/* Painel de opções */
.cs-list {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    right: 0;
    z-index: 60;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #ffffff;
    border-radius: 14px;
    box-shadow: 0 14px 38px rgba(0, 0, 0, 0.16), 0 4px 10px rgba(0, 0, 0, 0.06);
    max-height: 280px;
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-6px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.cs.open .cs-list {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.cs-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.72rem 0.85rem;
    border-radius: 9px;
    border-bottom: 1px solid #f1f1f1;
    color: #1a1a1a;
    font-size: clamp(0.92rem, 3.2vw, 1rem);
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease;
}

.cs-option:last-child {
    border-bottom: none;
}

.cs-option.active,
.cs-option:hover {
    background-color: #fdf6dd;
}

.cs-option[aria-selected="true"] {
    font-weight: 600;
}

.cs-option.cs-placeholder .cs-option-label {
    color: #9a9a9a;
}

.cs-option-label {
    flex: 1 1 auto;
}

/* Indicador de seleção (check) */
.cs-check {
    position: relative;
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.cs-check::after {
    content: '';
    position: absolute;
    left: 5px;
    top: 0;
    width: 5px;
    height: 11px;
    border: solid var(--primary-yellow);
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.cs-option[aria-selected="true"] .cs-check {
    opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
    .cs-arrow,
    .cs-list,
    .cs-option,
    .cs-check {
        transition: none;
    }
}
