/* --- Custom Dropdown Container --- */
@media (max-width: 992px) {
    .custom-dropdown {
        display: flex !important;
    }

    .dropdown-menu {
        position: fixed !important;
        bottom: 0;
    }

    ul.dropdown-options-list {
        flex-wrap: nowrap;
    }

    ul.dropdown-options-list .option-content {
        justify-content: center !important;
        padding: var(--space-lg);
    }

    ul.dropdown-options-list .options-item {
        width: 100%;
    }

}

/* Updated selector to use a class */
.custom-dropdown {
    display: none;
    position: relative;
    text-align: left;
}

/* --- 1. The Toggle Button --- */
/* Updated selector to use a class */
.dropdown-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px;
    background-color: var(--button-secondary-color-bg_hover);
    color: var(--button-secondary-color-fg);
    font-weight: 400;
    font-size: var(--text-s);
    border-radius: 8px;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
}

.chevron-down {
    min-width: 9px;
    height: auto;
    transform: rotate(0deg);
    transition: 0.3s ease-in-out;
}

.chevron-down path {
    stroke: var(--button-secondary-color-fg);
}

/* Custom class to rotate chevron when dropdown is open */
.dropdown-open .chevron-down {
    transform: rotate(-180deg);
    /* Points up */
}

/* --- 2. The Dropdown Menu (Your List) --- */
/* Updated selector to use a class */
.dropdown-menu {
    position: absolute;
    left: 0;
    z-index: 10;
    margin-top: 0.5rem;
    width: 100%;
    min-width: max-content;
    transform-origin: top left;
    background-color: #ffffff;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    border: 1px solid #e5e7eb;
    outline: none;
    transition: transform 0.1s ease-out, opacity 0.1s ease-out;

    /* Animation states */
    opacity: 0;
    transform: scale(0.95);
    display: none;
    /* Managed by JS and data-state */

    /* We'll reset padding/margin for consistency */
    padding: var(--space-xl);
    /* Added padding */
    margin: 0;
    box-sizing: border-box;
}

.dropdown-menu[data-state="open"] {
    opacity: 1;
    transform: scale(1);
}

/* Visually hide the radio button */
input.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* This targets the labels inside your structure */
.dropdown-menu label {
    flex-grow: 0 !important;
}