/* Kultursemesterticket – Filter (Zeitraum, Kategorien, aktive Filter)
   Gestaltung: flache Pillen in Dunkelblau/Weiss, Labels in PP Agrandir Tight,
   angelehnt an die Filterleiste der Hauptseite. */

:root {
    --filter-border: var(--border-strong);
    --filter-dark: var(--kst-blue);
}

.toolbar-inner {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

/* === Zeitraum === */
.date-filter {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.date-filter-label,
.active-filters-label {
    font-family: var(--font-label);
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
    margin-right: 0.4rem;
}

.date-btn,
.tag-chip {
    padding: 0.45em 1.1em;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 500;
    line-height: 1.3;
    border: 1px solid var(--filter-border);
    border-radius: var(--radius-pill);
    background: #fff;
    color: var(--kst-blue);
    white-space: nowrap;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.date-btn:hover,
.tag-chip:hover { border-color: var(--kst-blue); }

.date-btn.active,
.tag-chip.active {
    background: var(--kst-blue);
    border-color: var(--kst-blue);
    color: #fff;
}

.custom-date-row {
    display: none;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    width: 100%;
    margin-top: 0.2rem;
}
.custom-date-row.visible { display: flex; }

.custom-date-row label {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-light);
}

.custom-date-row input[type="date"] {
    padding: 0.4em 0.8em;
    font-size: 15px;
    border: 1px solid var(--filter-border);
    border-radius: var(--radius-pill);
    background: #fff;
    color: var(--text);
    outline: none;
    transition: border-color 0.15s ease;
}
.custom-date-row input[type="date"]:focus { border-color: var(--kst-blue); }

.custom-date-apply,
.custom-date-clear {
    padding: 0.45em 1.1em;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-pill);
    border: 1px solid var(--kst-blue);
    transition: background-color 0.15s ease, color 0.15s ease;
}
.custom-date-apply { background: var(--kst-blue); color: #fff; }
.custom-date-apply:hover { background: var(--kst-green); border-color: var(--kst-green); }
.custom-date-clear { background: transparent; color: var(--kst-blue); }
.custom-date-clear:hover { background: var(--kst-blue); color: #fff; }

/* === Filter & Kategorien (aufklappbar) === */
.filter-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    align-self: flex-start;
    padding: 0.3rem 0;
    font-family: var(--font-bold);
    font-size: 15px;
    letter-spacing: -0.01em;
    color: var(--kst-blue);
    user-select: none;
}
.filter-toggle svg {
    width: 16px; height: 16px;
    transition: transform 0.25s ease;
}
.filter-toggle.open svg { transform: rotate(180deg); }

.filter-toggle .filter-count {
    padding: 0 0.55em;
    border-radius: var(--radius-pill);
    background: var(--kst-yellow);
    color: var(--kst-blue);
    font-size: 12px;
    line-height: 1.7;
}

.filter-panel { display: none; padding-top: 0.2rem; }
.filter-panel.open { display: block; }

.filter-category { margin-bottom: 1rem; }
.filter-category:last-child { margin-bottom: 0; }

.filter-category-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-label);
    font-size: 13px;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-light);
}
.filter-category-label::before {
    content: '';
    width: 10px; height: 10px;
    border-radius: 50%;
    background: var(--kst-blue);
}
.filter-category-label.cat-kultur::before { background: var(--kst-blue); }
.filter-category-label.cat-gesellschaft::before { background: var(--kst-green); }
.filter-category-label.cat-bildung::before { background: var(--kst-lightblue); }
.filter-category-label.cat-inklusion::before { background: var(--kst-orange); }
.filter-category-label.cat-weitere::before { background: #9a9db8; }

.filter-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.tag-chip { font-size: 14px; padding: 0.4em 0.95em; }
.tag-chip .tag-count { margin-left: 0.35em; font-size: 12px; opacity: 0.6; }

/* Zugangs-Merkmale mit Symbol (siehe .access-badge in style.css) */
.tag-chip.has-badge { display: inline-flex; align-items: center; padding-left: 0.4em; }
.tag-chip .access-badge { width: 20px; height: 20px; margin-right: 0.45em; font-size: 8px; cursor: inherit; }
.tag-chip .access-badge svg { width: 13px; height: 13px; }
.tag-chip.active .access-badge { background: #fff; color: var(--kst-blue); }

/* === Aktive Filter === */
.active-filters {
    display: none;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border);
}
.active-filters.visible { display: flex; }

#active-filters-list { display: flex; flex-wrap: wrap; gap: 0.4rem; }

.active-filter-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4em;
    padding: 0.3em 0.85em;
    font-size: 14px;
    font-weight: 500;
    border-radius: var(--radius-pill);
    background: var(--kst-yellow);
    color: var(--kst-blue);
    transition: background-color 0.15s ease, color 0.15s ease;
}
.active-filter-pill:hover { background: var(--kst-green); color: #fff; }
.active-filter-pill .x { font-size: 1.05em; line-height: 1; }

.clear-all-btn {
    margin-left: auto;
    font-size: 14px;
    font-weight: 500;
    color: var(--kst-blue);
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* === Mobil === */
@media (max-width: 768px) {
    .date-filter-label { width: 100%; margin-right: 0; }
    .clear-all-btn { margin-left: 0; width: 100%; text-align: left; padding: 0.2rem 0; }
}
