/**
 * SSG Lightbox — eigenstaendiges Stylesheet.
 *
 * Die Overlay-Basis liegt historisch doppelt in frontend.css und meister.css
 * (das Athletenprofil laedt meister.css statt frontend.css). Die Galerie laedt
 * keine von beiden — deshalb hier eine wertgleiche Kopie der Basis plus die
 * neuen Teile fuer den Gruppen-Modus (Pfeile, Zaehler, Fokus-Ring).
 * Die beiden Altkopien bleiben unangetastet.
 *
 * Farbwelt: blau / weiss / grau auf neutral-dunklem Grund.
 */

/* ── Lightbox-Overlay (wertgleich zu frontend.css) ── */
.ssg-lightbox-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .92);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999999;
    cursor: zoom-out;
    padding: 20px;
}
.ssg-lightbox-overlay img {
    max-width: 92vw;
    max-height: 92vh;
    object-fit: contain;
    border-radius: 4px;
}
.ssg-lightbox-overlay .ssg-lightbox-close {
    position: absolute;
    top: 16px;
    right: 20px;
    color: #fff;
    background: transparent;
    border: 1px solid #fff;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ── Gruppen-Modus: Bild ist anklickbar ohne zu schliessen ── */
.ssg-lightbox-overlay--gruppe img { cursor: default; }
.ssg-lightbox-overlay--gruppe {
    /* Platz fuer Pfeile links/rechts und den Zaehler unten. */
    padding: 20px 76px 64px;
}

/* ── Blaetter-Pfeile ──
   Trefferflaeche 48x48 (>= 44px), vertikal zentriert, heller Rand fuer
   Kontrast auf dunklem Grund. */
.ssg-lightbox-overlay .ssg-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 34px;
    line-height: 1;
    padding: 0;
    margin: 0;
    color: #fff;
    background-color: rgba(30, 53, 96, .72);   /* Marken-Navy, transparent */
    border: 1px solid rgba(255, 255, 255, .55);
    border-radius: 50%;
    cursor: pointer;
    /* Anti-Elementor: sonst faerbt das Kit die Buttons ein. */
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    transition: background-color .15s, border-color .15s;
}
.ssg-lightbox-overlay .ssg-lightbox-nav--zurueck { left: 14px; }
.ssg-lightbox-overlay .ssg-lightbox-nav--vor { right: 14px; }
.ssg-lightbox-overlay .ssg-lightbox-nav:hover,
.ssg-lightbox-overlay .ssg-lightbox-nav:focus,
.ssg-lightbox-overlay .ssg-lightbox-nav:focus-visible,
.ssg-lightbox-overlay .ssg-lightbox-nav:active {
    color: #fff;
    background-color: rgba(59, 130, 196, .92);  /* Marken-Hellblau */
    border-color: #fff;
    box-shadow: none;
}

/* ── Zaehler „7 / 41“ ── */
.ssg-lightbox-overlay .ssg-lightbox-zaehler {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 4px 12px;
    font-size: 13px;
    font-variant-numeric: tabular-nums;
    letter-spacing: .02em;
    color: #fff;
    background-color: rgba(0, 0, 0, .55);
    border: 1px solid rgba(255, 255, 255, .28);
    border-radius: 999px;
    pointer-events: none;
}

/* ── Schliessen-Button: gleiche Anti-Elementor-Rezeptur ── */
.ssg-lightbox-overlay .ssg-lightbox-close {
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    line-height: 1;
    padding: 0;
    margin: 0;
}
.ssg-lightbox-overlay .ssg-lightbox-close:hover,
.ssg-lightbox-overlay .ssg-lightbox-close:focus,
.ssg-lightbox-overlay .ssg-lightbox-close:focus-visible,
.ssg-lightbox-overlay .ssg-lightbox-close:active {
    color: #fff;
    background-color: rgba(59, 130, 196, .92);  /* Marken-Hellblau */
    border-color: #fff;
    box-shadow: none;
}

/* ── Sichtbarer Fokus-Ring ── */
.ssg-lightbox-overlay .ssg-lightbox-nav:focus-visible,
.ssg-lightbox-overlay .ssg-lightbox-close:focus-visible {
    outline: 3px solid var(--ssg-accent-blue, #3b82c4);
    outline-offset: 3px;
}

/* ── Mobil: kleinere, aber weiterhin bedienbare Pfeile (44x44) ── */
@media (max-width: 600px) {
    .ssg-lightbox-overlay--gruppe { padding: 16px 8px 56px; }
    .ssg-lightbox-overlay .ssg-lightbox-nav {
        width: 44px;
        height: 44px;
        font-size: 28px;
    }
    .ssg-lightbox-overlay .ssg-lightbox-nav--zurueck { left: 6px; }
    .ssg-lightbox-overlay .ssg-lightbox-nav--vor { right: 6px; }
    .ssg-lightbox-overlay .ssg-lightbox-zaehler { bottom: 14px; }
}
