.filter-backdrop {
    position: fixed;
    inset: 0;
    background: rgb(0 0 0 / 66%);
    z-index: 1000;
}

.filter-backdrop.hidden {
    display: none;
}

.filter-modal.hidden {
    display: none;
}

.filter-modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    background: none;
    border-radius: 7px;
    overflow: hidden;
    z-index: 1001;
    font-size: 16px;
    box-shadow: 0 0 20px -9px #000;
}

.filter-modal__header, .filter-modal__footer, .filter-modal__body {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 10px 15px;
}

.filter-modal__header h2 {
    font-size: 18px;
    color: var(--bg-surface);
    font-weight: 400;
}

button.filter-close {
    background: none;
    border: none;
    color: var(--bg-surface);
    font-size: 25px;
    font-family: fangsong;
    cursor: pointer;
}

.filter-modal__body {
    display: block;
    background: var(--bg-surface);
    height: max-content;
}

.filter-modal__footer {
    background: var(--bg-surface);
    gap: 10px;
    border-top: 1px solid var(--border-default);
}

.filter-modal__footer button {padding: 8px 0px;font-size: 12px;margin: 0px;width: 100%;border-radius: 5px;cursor: pointer;}

.filter-modal__header {
    background: var(--text-primary);
}

.filter-modal__footer .btn--secondary {
    background: var(--bg-surface);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
}

.filter-modal__footer .btn--primary {
    background: var(--text-primary);
    border: 1px solid var(--text-primary);
    color: var(--bg-surface);
}

.filter-row {
    display: flex;
    overflow: hidden;
    overflow-x: visible;
    scrollbar-width: thin;
    padding-bottom: 4px;
    height: max-content;
    gap: 10px;
    flex-wrap: nowrap;
    margin: 10px 0px;
    scrollbar-gutter: stable;
}

.filter-row button {
    color: var(--text-secondary);
    font-size: 13px;
    padding: 5px 22px 5px;
    background: var(--bg-search);
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 500;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
    white-space: nowrap;
}

button.filter-button.active {
    color: var(--bg-surface);
    background: var(--text-primary);
}

button.filter-button.selected {
    color: var(--text-primary);
}

button.filter-button.active.selected {
    color: var(--bg-surface);
    font-weight: 700;
}