/* ── Dropdown menu (Figma) ─────────────────────────────── */

html:not(.dropdowns-ready) .dropdown__menu {
    visibility: hidden;
}

.dropdown {
    position: relative;
}

.dropdown__menu {
    position: absolute;
    top: calc(100% + 8px);
    left: 0;
    z-index: 100;
    width: 256px;
    padding: 4px;
    border-radius: 12px;
    background: var(--color-white);
    box-shadow:
        0 1px 2px rgb(16 16 18 / 12%),
        0 4px 4px rgb(16 16 18 / 4%),
        0 12px 8px rgb(16 16 18 / 2%),
        0 24px 12px rgb(16 16 18 / 1%);
}

.dropdown__menu::before {
    content: "";
    position: absolute;
    right: 0;
    bottom: 100%;
    left: 0;
    height: 8px;
}

.dropdown__menu[hidden] {
    display: none;
}

.dropdown__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.dropdown__search {
    display: flex;
    align-items: center;
    gap: 8px;
    min-height: 48px;
    padding: 0 12px;
    border-radius: 8px;
    background: #f3f0ec;
}

.dropdown__search-icon {
    flex-shrink: 0;
}

.dropdown__search-input {
    width: 100%;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--color-brand-brown);
    font-family: var(--font-family-base);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.02em;
    outline: none;
}

.dropdown__search-input::placeholder {
    color: var(--color-brand-brown);
}

.dropdown__list-wrap {
    display: flex;
    gap: 4px;
    max-height: 400px;
}

.dropdown__list {
    flex: 1 1 auto;
    min-width: 0;
    max-height: 400px;
    margin: 0;
    padding: 0;
    list-style: none;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #d9d2cb #ece9e7;
}

.dropdown__list::-webkit-scrollbar {
    width: 4px;
}

.dropdown__list::-webkit-scrollbar-track {
    border-radius: 111px;
    background: #ece9e7;
}

.dropdown__list::-webkit-scrollbar-thumb {
    border-radius: 111px;
    background: #d9d2cb;
}

.dropdown__item {
    margin: 0;
}

.dropdown__option {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 40px;
    padding: 8px 12px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: var(--color-brand-dark);
    font-family: var(--font-family-base);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.5;
    letter-spacing: -0.02em;
    text-align: left;
    cursor: pointer;
    transition: background-color var(--transition-ui);
}

.dropdown__option:hover,
.dropdown__option:focus-visible {
    background: #f8f4f0;
}

.dropdown__link {
    text-decoration: none;
    color: inherit;
}

.dropdown--nav .dropdown__list {
    max-height: none;
    overflow: visible;
}

.dropdown__option[aria-selected="true"] {
    background: #f8f4f0;
}

.dropdown__option[hidden] {
    display: none;
}

.dropdown__empty {
    padding: 12px;
    color: var(--color-header-muted);
    font-size: 14px;
    line-height: 1.25;
}

.dropdown__empty[hidden] {
    display: none;
}
