.hq-sync-standorte__tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--wp--preset--color--linie-fein);
}

.hq-sync-standorte__tab {
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    padding: 10px 4px;
    margin-bottom: -1px;
    font-size: 0.95em;
    font-weight: 600;
    color: var(--wp--preset--color--text-leise);
    cursor: pointer;
}

.hq-sync-standorte__tab + .hq-sync-standorte__tab {
    margin-left: 18px;
}

.hq-sync-standorte__tab.is-aktiv {
    color: var(--wp--preset--color--tinte);
    border-bottom-color: var(--wp--preset--color--signal);
}

.hq-sync-standorte {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
}

.hq-sync-standorte[hidden] {
    display: none;
}

.hq-sync-standort-card {
    display: flex;
    flex-direction: column;
    background: var(--wp--preset--color--flaeche);
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 2px 12px rgba(0, 10, 20, 0.1);
}

.hq-sync-standort-card__bild {
    position: relative;
    aspect-ratio: 16 / 10;
    background: var(--wp--preset--color--flaeche-gesenkt);
    overflow: hidden;
}

.hq-sync-standort-card__bild img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: filter 0.2s ease;
}

.hq-sync-standort-card.is-beendet .hq-sync-standort-card__bild img {
    filter: brightness(0.55);
}

.hq-sync-standort-card__beendet-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--wp--preset--color--signal);
    color: var(--wp--preset--color--flaeche);
    font-weight: 700;
    font-size: 0.85em;
    letter-spacing: 0.02em;
    padding: 8px 22px;
    border-radius: 0;
    white-space: nowrap;
}

.hq-sync-standort-card__body {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding: 18px 20px 22px;
}

.hq-sync-standort-card__ziel {
    display: flex;
    align-self: flex-start;
    font-size: 0.8em;
    font-weight: 700;
    border-radius: 0;
    overflow: hidden;
}

.hq-sync-standort-card__ziel-label {
    background: var(--wp--preset--color--tinte);
    color: var(--wp--preset--color--flaeche);
    padding: 6px 10px;
    letter-spacing: 0.02em;
}

.hq-sync-standort-card__ziel-betrag {
    background: var(--wp--preset--color--signal);
    color: var(--wp--preset--color--flaeche);
    padding: 6px 12px;
}

.hq-sync-standort-card__zeitraum {
    margin: 0;
    font-size: 0.85em;
    color: var(--wp--preset--color--text-leise);
}

/* Feste 2-zeilige Platzhalterhoehe, analog zu .hq-sync-projekt-card__titel -
   auch bei kuerzeren Namen bleibt die zweite Zeile als Leerraum erhalten,
   damit nachfolgende Elemente (Beschreibung, Fortschrittsbalken) ueber alle
   Karten einer Reihe hinweg auf gleicher Hoehe bleiben. */
.hq-sync-standort-card__name {
    margin: 2px 0 0;
    font-size: 1.15em;
    line-height: 1.3;
    min-height: calc(1.3em * 2);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Hoehere Spezifitaet (2 statt 1 Klasse) als Absicht, nicht Zufall:
   WordPress' globale Stilregel ":root :where(p) { line-height: 1.6 }" hat
   dieselbe Spezifitaet wie eine einzelne Klasse - bei Gleichstand gewinnt
   je nach Ladereihenfolge mal die eine, mal die andere Regel. Das hat dazu
   gefuehrt, dass hier real 1.6 statt der gewuenschten 1.4 gerendert wurde,
   waehrend die min-height-Berechnung (die em-basiert direkt aus font-size
   rechnet, nicht aus dem tatsaechlich genutzten line-height) weiterhin von
   1.4 ausging - dadurch wurde Kurztext mit vollen 3 Zeilen hoeher als die
   dafuer reservierte Flaeche, was Karten in derselben Reihe unterschiedlich
   hoch werden liess. */
.hq-sync-standort-card__body .hq-sync-standort-card__beschreibung {
    margin: 0;
    color: var(--wp--preset--color--text-gedaempft);
    font-size: 0.92em;
    line-height: 1.4;
    min-height: calc(1.4em * 3);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hq-sync-standort-card__fortschritt {
    height: 8px;
    background: var(--wp--preset--color--linie-fein);
    border-radius: 0;
    overflow: hidden;
    margin-top: 4px;
}

.hq-sync-standort-card__fortschritt-fuellung {
    height: 100%;
    background: var(--wp--preset--color--signal);
    border-radius: 0;
}

.hq-sync-standort-card__fortschritt.ist-versteckt,
.hq-sync-standort-card__prozent.ist-versteckt {
    visibility: hidden;
}

.hq-sync-standort-card__prozent {
    margin: 0;
    text-align: center;
    font-size: 0.85em;
    color: var(--wp--preset--color--text-leise);
}

.hq-sync-standort-card__eingegangen {
    margin: 4px 0 0;
    font-size: 0.92em;
}

.hq-sync-standort-card__cta,
.hq-sync-standort-card__verlauf {
    display: block;
    text-align: center;
    padding: 10px 16px;
    border-radius: 0;
    font-size: 0.92em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
}

.hq-sync-standort-card__cta {
    background: var(--wp--preset--color--signal);
    color: var(--wp--preset--color--flaeche);
}

/* Die Theme-Bruecke (assets/css/components.css) erzwingt auf jedem
   [class*="__cta"]-Element per !important Vereinsrot - das ueberschreibt
   sonst auch den beabsichtigten neutralen "beendet"-Zustand. Deshalb hier
   ebenfalls !important + hoehere Spezifitaet (3 statt 2 Klassen), damit
   ein beendeter Standort erkennbar nicht mehr aktionsfaehig wirkt. */
.hq-sync-standorte .hq-sync-standort-card__cta.is-beendet {
    background: var(--wp--preset--color--text-leise) !important;
    border-color: var(--wp--preset--color--text-leise) !important;
    cursor: default;
}

.hq-sync-standort-card__verlauf {
    background: var(--wp--preset--color--flaeche-gesenkt);
    color: var(--wp--preset--color--tinte);
    border: 1px solid var(--wp--preset--color--linie);
}

.hq-sync-standort-card__cta--platzhalter,
.hq-sync-standort-card__verlauf--platzhalter {
    visibility: hidden;
}

.hq-sync-standort-card__meta {
    margin: 6px 0 0;
    font-size: 0.78em;
    color: var(--wp--preset--color--text-leise);
    text-align: center;
}

.hq-sync-hinweis {
    color: var(--wp--preset--color--text-leise);
}

/* Zuwendungsverlauf-Popup */

.hq-sync-verlauf-overlay {
    position: fixed;
    inset: 0;
    background: rgba(10, 15, 20, 0.55);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 6vh 16px;
    z-index: 9999;
}

.hq-sync-verlauf-overlay[hidden] {
    display: none;
}

body.hq-sync-verlauf-offen {
    overflow: hidden;
}

.hq-sync-verlauf {
    background: var(--wp--preset--color--flaeche);
    width: 100%;
    max-width: 480px;
    max-height: 82vh;
    border-radius: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.hq-sync-verlauf__kopf {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--wp--preset--color--signal);
    color: var(--wp--preset--color--flaeche);
    padding: 14px 18px;
}

.hq-sync-verlauf__kopf h2 {
    margin: 0;
    font-size: 1.15em;
    color: var(--wp--preset--color--flaeche);
}

.hq-sync-verlauf__schliessen {
    background: rgba(255, 255, 255, 0.15);
    border: none;
    color: var(--wp--preset--color--flaeche);
    width: 30px;
    height: 30px;
    border-radius: 0;
    font-size: 1.2em;
    line-height: 1;
    cursor: pointer;
}

.hq-sync-verlauf__inhalt {
    padding: 8px 18px;
    overflow-y: auto;
}

.hq-sync-verlauf__eintrag {
    padding: 12px 0;
    border-bottom: 1px solid var(--wp--preset--color--linie-fein);
    font-size: 0.92em;
}

.hq-sync-verlauf__eintrag:last-child {
    border-bottom: none;
}

.hq-sync-verlauf__kommentar {
    color: var(--wp--preset--color--text-gedaempft);
    margin-top: 2px;
}

.hq-sync-verlauf__kategorie {
    color: var(--wp--preset--color--text-leise);
    font-size: 0.9em;
    margin-top: 2px;
}

.hq-sync-verlauf__status {
    padding: 18px 0;
    color: var(--wp--preset--color--text-leise);
    text-align: center;
}

.hq-sync-verlauf__pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 18px;
    border-top: 1px solid var(--wp--preset--color--linie-fein);
    font-size: 0.88em;
    color: var(--wp--preset--color--text-gedaempft);
}

.hq-sync-verlauf__pagination button {
    background: var(--wp--preset--color--flaeche-gesenkt);
    border: 1px solid var(--wp--preset--color--linie);
    border-radius: 0;
    padding: 6px 12px;
    cursor: pointer;
}

.hq-sync-verlauf__pagination button:disabled {
    opacity: 0.5;
    cursor: default;
}
