/* Immowelt-ähnliches Filter-Panel – Wohnen-Fix Suche */

.search-toolbar__row {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 10px;
}

.search-toolbar__row .search-filter-field {
    flex: 1 1 140px;
    min-width: 120px;
}

.search-filter-field--radius {
    flex: 0 1 120px;
    min-width: 110px;
}

.wf-filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: 10px;
    border: 1px solid #cbd5e1;
    background: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    white-space: nowrap;
}

.wf-filter-toggle:hover {
    border-color: #2f6b57;
    color: #2f6b57;
}

.wf-filter-subhead {
    margin: 12px 0 8px;
    font-size: 0.8rem;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.wf-filter-badge {
    display: inline-flex;
    min-width: 20px;
    height: 20px;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: #2f6b57;
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0 6px;
}

.wf-filter-badge[hidden] {
    display: none;
}

.wf-filter-drawer {
    position: fixed;
    inset: 0;
    z-index: 200;
    pointer-events: none;
}

.wf-filter-drawer.is-open {
    pointer-events: auto;
}

.wf-filter-drawer__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    opacity: 0;
    transition: opacity 0.2s ease;
}

.wf-filter-drawer.is-open .wf-filter-drawer__backdrop {
    opacity: 1;
}

.wf-filter-drawer__panel {
    position: absolute;
    top: 0;
    right: 0;
    width: min(420px, 100vw);
    height: 100%;
    background: #fff;
    box-shadow: -8px 0 32px rgba(15, 23, 42, 0.12);
    transform: translateX(100%);
    transition: transform 0.25s ease;
    display: flex;
    flex-direction: column;
}

.wf-filter-drawer.is-open .wf-filter-drawer__panel {
    transform: translateX(0);
}

.wf-filter-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 18px;
    border-bottom: 1px solid #e2e8f0;
}

.wf-filter-drawer__head h2 {
    margin: 0;
    font-size: 1.1rem;
}

.wf-filter-drawer__close {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
}

.wf-filter-drawer__body {
    flex: 1;
    overflow-y: auto;
    padding: 12px 18px 24px;
}

.wf-filter-group {
    border-bottom: 1px solid #f1f5f9;
    padding: 12px 0;
}

.wf-filter-group summary {
    cursor: pointer;
    font-weight: 700;
    font-size: 0.88rem;
    color: #0f172a;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wf-filter-group summary::-webkit-details-marker {
    display: none;
}

.wf-filter-group__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px 12px;
    margin-top: 10px;
}

.wf-filter-group__grid--3 {
    grid-template-columns: repeat(3, 1fr);
}

.wf-filter-check {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font-size: 0.82rem;
    color: #334155;
    cursor: pointer;
}

.wf-filter-check input {
    margin-top: 2px;
    accent-color: #2f6b57;
}

.wf-filter-field label {
    display: block;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748b;
    margin-bottom: 4px;
}

.wf-filter-field input,
.wf-filter-field select {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 0.88rem;
}

.wf-filter-drawer__foot {
    padding: 12px 18px 18px;
    border-top: 1px solid #e2e8f0;
    display: flex;
    gap: 10px;
    background: #fff;
}

.wf-filter-drawer__foot .portal-btn {
    flex: 1;
    min-height: 46px;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
}

.wf-filter-drawer__foot .portal-btn:hover {
    transform: translateY(-1px);
}

/* Zurücksetzen – weiß mit grünem Rand */
.wf-filter-drawer__foot .portal-btn--ghost,
.wf-filter-drawer__foot #wfFilterReset {
    background: #fff;
    color: #2f6b57;
    border: 2px solid #2f6b57;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
}

.wf-filter-drawer__foot .portal-btn--ghost:hover,
.wf-filter-drawer__foot #wfFilterReset:hover {
    background: #f0fdf4;
    border-color: #1b5e20;
    color: #14532d;
    box-shadow: 0 4px 14px rgba(47, 107, 87, 0.12);
}

/* Übernehmen – Wohnen-Fix Grün */
.wf-filter-drawer__foot .portal-btn--primary,
.wf-filter-drawer__foot #wfFilterApply {
    background: linear-gradient(145deg, #22c55e, #2f6b57);
    color: #fff;
    border: none;
    box-shadow: 0 6px 20px rgba(47, 107, 87, 0.28);
}

.wf-filter-drawer__foot .portal-btn--primary:hover,
.wf-filter-drawer__foot #wfFilterApply:hover {
    background: linear-gradient(145deg, #16a34a, #276b57);
    box-shadow: 0 8px 24px rgba(47, 107, 87, 0.35);
}

@media (max-width: 720px) {
    .wf-suche-layout {
        grid-template-columns: 1fr;
    }
}
