/* =========================================
   OLD FILTERS — без изменений
========================================= */

.filters {
    border: 1px solid var(--line);
    border-radius: var(--r-xl);
    background: linear-gradient(180deg, #fff, #f7f7f7);
    padding: 20px;
    box-shadow: var(--shadow);
}

.filters .filters-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr auto;
    gap: 14px;
    align-items: end;
}

.filters .field {
    display: grid;
    gap: 6px;
}

.filters .field label {
    font-size: 12px !important;
    color: var(--muted) !important;
}

.filters .control {
    height: 44px !important;
    padding: 0 14px !important;
    border-radius: 14px !important;
    border: 1px solid var(--line) !important;
    background: #fff !important;
    font-size: 14px !important;
}

/* кнопка Clear как раньше */
.filters .btn {
    height: 44px !important;
    padding: 0 18px !important;
    border-radius: 999px !important;
    border: 1px solid var(--line) !important;
    background: linear-gradient(180deg, #fff, #f3f3f3) !important;
    cursor: pointer !important;
    font-size: 13px !important;
    color: var(--muted) !important;
    box-shadow: none !important;
    text-decoration: none !important;

    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* =========================================
   CHIP SELECT — "перенос" стилей .control
========================================= */

.filters .chip-select {
    position: relative;
}

/* делаем trigger визуально 1:1 как .control */
.filters .chip-select-trigger {
    height: 44px !important;
    padding: 0 14px !important;
    border-radius: 14px !important;
    border: 1px solid var(--line) !important;
    background: #fff !important;
    font-size: 14px !important;
    color: var(--text) !important;

    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;

    cursor: pointer !important;
    user-select: none !important;
}

/* стрелка как у select (очень нейтральная) */
.filters .chip-select-trigger::after {
    content: "";
    width: 10px;
    height: 10px;
    margin-left: 12px;
    border-right: 1.6px solid var(--muted);
    border-bottom: 1.6px solid var(--muted);
    transform: rotate(45deg);
    opacity: .9;
}

/* dropdown — как нативное меню, но в твоём стиле */
.filters .chip-select-dropdown {
    flex-direction: column;
    gap: 4px;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(44px + 8px);
    z-index: 60;

    display: none;
    padding: 8px;

    border-radius: 14px;
    border: 1px solid var(--line);
    background: #fff;
    box-shadow: var(--shadow);

    max-height: 320px;
    overflow: auto;
}

.filters .chip-select.open .chip-select-dropdown {
    display: flex;
}

/* option */
.filters .chip-select-option a {
    display: flex;
    align-items: center;

    height: 40px;
    padding: 0 12px;
    border-radius: 12px;

    font-size: 13px;
    color: var(--text);
    text-decoration: none;
}

/* hover */
.filters .chip-select-option a:hover {
    background: #f3f3f3;
}

/* selected — мягко, без новых цветов */
.filters .chip-select-option.selected a {
    background: #f1f1f1;
}

/* активный фильтр — чуть “select-like” акцент без новизны */
.filters .chip-select--active .chip-select-trigger {
    background: linear-gradient(180deg, #fff, #f7f7f7) !important;
}

/* фокус как у контролов */
.filters .chip-select-trigger:focus-visible,
.filters .chip-select-option a:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0,0,0,.08);
}


/* каждый селект — отдельный контекст, а открытый должен быть выше остальных */
.filters .chip-select {
    position: relative;
    z-index: 1;
}

.filters .chip-select.open {
    z-index: 80;
}

/* сам dropdown */
.filters .chip-select-dropdown {
    z-index: 100; /* работает только если родители не режут overflow */
}
