Bisher blieb die Filter-Spalte auch bei geschlossenem <details>-Element in voller Breite stehen, da nur der Inhalt (nicht die Grid-Spalte) ausgeblendet wurde. Jetzt schrumpft die Spalte per :has()-Selektor auf 56px und zeigt nur noch ein Icon zum Wiederaufklappen. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
197 lines
4.1 KiB
CSS
197 lines
4.1 KiB
CSS
/* Filter- und Suchpanel (Phase 4). Struktur wird von
|
|
js/filters/filterPanel.js in #filter-panel eingehängt.
|
|
|
|
<details>/<summary> übernimmt das Auf-/Zuklappen JS-frei - sowohl mobil
|
|
(Panel oberhalb der Liste) als auch auf Desktop (>=1024px, Panel als
|
|
eigene Spalte rechts neben der Ergebnisliste, siehe css/responsive.css). */
|
|
|
|
.filter-panel {
|
|
background: var(--color-surface);
|
|
border-bottom: 1px solid var(--color-border);
|
|
}
|
|
|
|
.filter-panel__details {
|
|
padding: 0 var(--space-md);
|
|
}
|
|
|
|
.filter-panel__details[open] {
|
|
padding-bottom: var(--space-md);
|
|
}
|
|
|
|
.filter-panel__summary {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-sm);
|
|
padding: var(--space-md) 0;
|
|
font-weight: 700;
|
|
cursor: pointer;
|
|
list-style: none;
|
|
}
|
|
|
|
.filter-panel__summary::-webkit-details-marker {
|
|
display: none;
|
|
}
|
|
|
|
.filter-panel__summary::before {
|
|
content: '▸ ';
|
|
}
|
|
|
|
.filter-panel__details[open] > .filter-panel__summary::before {
|
|
content: '▾ ';
|
|
}
|
|
|
|
/* Nur im eingeklappten Desktop-Zustand als eigenständiges Icon sichtbar
|
|
(siehe Media-Query unten) - sonst steckt das Icon unauffällig neben dem
|
|
Text, ohne das Mobile-Layout zu verändern. */
|
|
.filter-panel__summary-icon {
|
|
display: none;
|
|
font-size: 1.3rem;
|
|
line-height: 1;
|
|
}
|
|
|
|
.filter-panel__body {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-md);
|
|
}
|
|
|
|
.filter-panel__section {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-sm);
|
|
border: none;
|
|
border-top: 1px solid var(--color-border);
|
|
padding: var(--space-sm) 0 0;
|
|
margin: 0;
|
|
}
|
|
|
|
.filter-panel__section-label {
|
|
padding: 0;
|
|
font-size: 0.8rem;
|
|
font-weight: 700;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.02em;
|
|
color: var(--color-text-muted);
|
|
}
|
|
|
|
.filter-panel__field {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-xs);
|
|
flex: 1 1 160px;
|
|
}
|
|
|
|
.filter-panel__label {
|
|
font-size: 0.85rem;
|
|
font-weight: 600;
|
|
}
|
|
|
|
.filter-panel__field input,
|
|
.filter-panel__field select,
|
|
.filter-panel__distance input,
|
|
.filter-panel__distance select {
|
|
border: 1px solid var(--color-border);
|
|
border-radius: var(--radius-sm);
|
|
padding: var(--space-sm);
|
|
font: inherit;
|
|
background: var(--color-surface);
|
|
color: var(--color-text);
|
|
width: 100%;
|
|
}
|
|
|
|
.filter-panel__row {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: var(--space-md);
|
|
}
|
|
|
|
.filter-panel__categories {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: var(--space-sm) var(--space-md);
|
|
max-height: 180px;
|
|
overflow-y: auto;
|
|
padding: var(--space-xs) 0;
|
|
}
|
|
|
|
.filter-panel__category-option,
|
|
.filter-panel__checkbox {
|
|
display: flex;
|
|
align-items: center;
|
|
gap: var(--space-xs);
|
|
font-size: 0.85rem;
|
|
cursor: pointer;
|
|
}
|
|
|
|
.filter-panel__category-swatch {
|
|
width: 10px;
|
|
height: 10px;
|
|
border-radius: 50%;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.filter-panel__checkbox-group {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
gap: var(--space-sm) var(--space-md);
|
|
}
|
|
|
|
.filter-panel__distance {
|
|
display: flex;
|
|
flex-direction: column;
|
|
gap: var(--space-xs);
|
|
max-width: 220px;
|
|
}
|
|
|
|
.filter-panel__hint {
|
|
font-size: 0.8rem;
|
|
color: var(--color-text-muted);
|
|
}
|
|
|
|
.filter-panel__hint[hidden] {
|
|
display: none;
|
|
}
|
|
|
|
.filter-panel__location-btn[hidden] {
|
|
display: none;
|
|
}
|
|
|
|
.filter-panel__actions {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
align-items: center;
|
|
gap: var(--space-sm) var(--space-md);
|
|
padding-top: var(--space-md);
|
|
border-top: 1px solid var(--color-border);
|
|
}
|
|
|
|
.filter-panel__count {
|
|
font-size: 0.85rem;
|
|
font-weight: 600;
|
|
color: var(--color-text-muted);
|
|
margin-right: auto;
|
|
}
|
|
|
|
@media (min-width: 1024px) {
|
|
.filter-panel {
|
|
border-bottom: none;
|
|
}
|
|
|
|
/* Eingeklappt: Spalte auf Icon-Breite schrumpfen lassen (Grid-Breite
|
|
siehe css/responsive.css) statt nur den Inhalt zu verstecken - sonst
|
|
bleibt die leere Spalte trotzdem in voller Breite stehen. */
|
|
.filter-panel__details:not([open]) .filter-panel__summary {
|
|
justify-content: center;
|
|
padding: var(--space-md) 0;
|
|
}
|
|
|
|
.filter-panel__details:not([open]) .filter-panel__summary-icon {
|
|
display: block;
|
|
}
|
|
|
|
.filter-panel__details:not([open]) .filter-panel__summary-text,
|
|
.filter-panel__details:not([open]) .filter-panel__summary::before {
|
|
display: none;
|
|
}
|
|
}
|