/**
 * frontend.css — Public FileSeller frontend styles.
 *
 * Load order: [inline <style> all color tokens] → tokens.css → base.css → frontend.css
 *
 * @since 0.8.0
 * @since 0.8.0r  Redesigned: branding token overrides replace ad-hoc fs-* approach.
 * @since 0.9.9   Mobile: .fs-article padding reduced at 760px breakpoint.
 * @since 0.10.1  .checkout-grid, .form-legal-note added for checkout form.
 * @since 0.9.5   Branding override :root block removed. All color tokens are now
 *                injected directly by frontend.php's inline <style> as pre-computed
 *                rgba() values (no color-mix, no var()-in-color-function).
 *                This file now covers only frontend-specific component additions.
 *
 * base.css and tokens.css already provide the full component library:
 *   .page-shell, .site-header, .brand, .main-nav, .header-actions,
 *   .hero, .hero__grid, .panel, .hero__content, .hero__eyebrow, .hero__visual,
 *   .section, .section__header, .kpi-grid, .feature-grid, .product-grid,
 *   .process-grid, .card, .badge, .cta-banner, .site-footer, .footer-grid,
 *   .footer-bottom, .mock-window, .mock-card, .list, .list-item,
 *   .btn, .btn--primary, .btn--ghost, and responsive breakpoints.
 *
 * No backend CSS leaks into this file or into the frontend layout.
 * The only shared component is views/partials/platform-signature.php.
 */

/* ============================================================
   1. Brand logo image inside .brand__mark
   When a brand logo image is set, the mark shows the image full-width.
   ============================================================ */

.brand__mark img.brand__logo-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 10px;
}

/* ============================================================
   2. Platform signature in header context
   .platform-sig is placed in .header-actions — keep it inline-flex
   and apply the standard modifier sizing (.platform-sig--sm).
   ============================================================ */

.header-actions .platform-sig {
    display: inline-flex;
    align-items: baseline;
    gap: 3px;
    white-space: nowrap;
}

/* ============================================================
   3. Article page content (generic pages / about / legal etc.)
   ============================================================ */

.fs-article {
    max-width: 800px;
    padding: 40px;
}

.fs-article__title {
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    font-weight: 700;
    line-height: 1.15;
    margin: 0 0 24px;
}

.fs-article__content {
    color: var(--text-soft);
    line-height: 1.8;
}

.fs-article__content h2,
.fs-article__content h3,
.fs-article__content h4 {
    color: var(--text);
    margin: 2em 0 0.5em;
    font-weight: 700;
}

.fs-article__content p { margin: 0 0 1em; }

.fs-article__content a {
    color: var(--primary);
    text-decoration: underline;
}

.fs-article__content ul,
.fs-article__content ol {
    padding-left: 1.5em;
    margin: 0 0 1em;
}

.fs-article__content li { margin-bottom: 0.3em; }

/* ============================================================
   5. Hero page content inline (for home pages)
   ============================================================ */

.hero__page-content {
    margin-top: 18px;
    color: var(--text-soft);
    line-height: 1.72;
    max-width: 62ch;
}

.hero__page-content p { margin: 0 0 1em; }

/* ============================================================
   6. Header brand — no brand text (logo mark only, widened)
   The platform signature on the right already carries the
   product name, so .brand__text in the header is hidden to
   avoid duplication. The .brand__mark is widened to fill the
   combined icon+text space of the original brand area.
   The footer brand keeps its text (different layout context).
   ============================================================ */

.site-header .brand {
    min-width: auto;
}

.site-header .brand__text {
    display: none;
}

.site-header .brand__mark {
    border: none;
    background: none;
    box-shadow: none;
    width: 160px;   /* approx. icon(42px) + gap(14px) + brand-text(≈100px) */
    height: 42px;
    border-radius: 12px;
}

/* ============================================================
   7. Platform signature — frontend styling
   .platform-sig__name/.author are styled in backend.css which
   is NOT loaded on the frontend. Define equivalent rules here
   so the header and footer signature renders correctly.
   ============================================================ */

.platform-sig__name {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.82rem;
    letter-spacing: 0.01em;
}

.platform-sig__author {
    color: rgba(255, 255, 255, 0.50);
    font-size: 0.82rem;
}

/* ============================================================
   v0.8.1 — Mobile Responsive
   All mobile rules are strictly inside @media blocks.
   No global rules. Desktop (v0.8.0) is fully unchanged.
   ============================================================ */

@media (max-width: 760px) {

    /* ---- Sticky header ---- */
    .site-header {
        position: sticky;
        top: 0;
        z-index: 50;
        backdrop-filter: blur(8px);
    }

    /* ---- Brand mark: narrower on mobile, but still wide enough for logo ----
       Desktop: 160px wide (icon+text area).
       Mobile: 120px wide so the logo image stays readable; height bumped to 48px
       for better touch-area and visual weight. */
    .site-header .brand__mark {
        width: 120px;
        height: 48px;
    }

    /* ---- Navigation: 2-column touch grid ---- */
    .main-nav {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
        width: 100%;
    }

    .main-nav a {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: var(--radius-sm);
        background: rgba(255, 255, 255, 0.03);
        border: 1px solid var(--accent-a14);
        text-align: center;
    }

    /* ---- Hero ---- */
    /* v0.13.1: show visual below text on mobile instead of hiding it entirely.
       v0.13.3: max-height removed — mobile-slider.js replaces mock-window with
       a full-width image slider; mock-window + mock-card hidden via CSS. */
    .hero__visual {
        display:  block;
        padding:  0;
    }
    .hero__visual .mock-window,
    .hero__visual .mock-card {
        display: none; /* slider takes over on mobile */
    }

    .hero__content {
        width: 100%;
    }

    .hero h1 {
        font-size: clamp(1.9rem, 6vw, 2.4rem);
    }

    .hero .btn {
        width: 100%;
    }

    /* ---- Touch-optimised buttons ---- */
    .btn,
    .product-card .btn,
    .hero .btn {
        min-height: 48px;
        width: 100%;
    }

    /* ---- Product cards ---- */
    .product-card .btn {
        width: 100%;
    }

    /* ---- Footer bottom ---- */
    .footer-bottom {
        text-align: center;
    }

    /* ---- Article page: reduce horizontal padding on mobile ----
       Desktop: 40px (set in .fs-article).
       Mobile: 20px so text reaches the edge without cramped gutters. */
    .fs-article {
        padding: 24px 20px;
    }

}

@media (max-width: 480px) {

    /* ---- Very small devices ---- */
    .container {
        padding-left: 16px;
        padding-right: 16px;
    }

    h1 {
        font-size: clamp(1.6rem, 7vw, 2rem);
    }

}

/* ==========================================================================
   Checkout layout (@since 0.10.1)
   Two-column grid: form left, product summary right.
   ========================================================================== */

.checkout-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 28px;
}

.form-legal-note {
    font-size: 0.88rem;
    color: var(--text-dim);
    margin-top: 8px;
}

.form-legal-note a {
    color: var(--primary);
    text-decoration: underline;
}

@media (max-width: 760px) {
    .checkout-grid {
        grid-template-columns: 1fr;
    }
    .checkout-summary {
        order: -1; /* Summary above form on mobile */
    }
}

/* ==========================================================================
   Print button — legal pages only (@since 0.10.0)
   Small icon-only button, floated top-right inside the article panel.
   ========================================================================== */

.fs-print-btn {
    float: right;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    /* Solid mid-grey border — visible on both light and dark backgrounds */
    border: 1px solid currentColor;
    border-radius: var(--radius-sm, 6px);
    /* No background — transparent so it blends with any panel color */
    background: transparent;
    /* currentColor tracks the icon; fallback chain: soft body text → muted → grey */
    color: var(--text-soft, var(--text-dim, #888));
    cursor: pointer;
    /* Slightly dimmed in resting state; full opacity on hover */
    opacity: 0.45;
    transition: opacity 0.15s, color 0.15s;
    margin-left: 14px;
    margin-bottom: 4px;
}

.fs-print-btn:hover,
.fs-print-btn:focus-visible {
    color: var(--primary, #5fa8ff);
    opacity: 1;
    outline: none;
}

/* ==========================================================================
   @media print — legal document rendering (@since 0.10.0)
   ==========================================================================
   Goal: clean A4-style printout — white background, dark text, no chrome.
   Only the article content prints; all navigation, headers, footers, and
   interactive elements are hidden.
   ========================================================================== */

@media print {

    /* ---- Page setup ---- */
    @page {
        size: A4 portrait;
        margin: 20mm 18mm 20mm 18mm;
    }

    /* ---- Reset backgrounds and colors to print-safe values ---- */
    *,
    *::before,
    *::after {
        background: white !important;
        color: #111 !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* ---- Hide site chrome ---- */
    .site-header,
    .site-footer,
    .fs-print-btn,
    .main-nav,
    .hero__actions,
    .platform-sig {
        display: none !important;
    }

    /* ---- Article panel: remove card chrome ---- */
    .panel,
    .fs-article {
        border: none !important;
        border-radius: 0 !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    /* ---- Container and section: full width, no side padding ---- */
    .container,
    .section {
        max-width: 100% !important;
        padding: 0 !important;
        margin: 0 !important;
    }

    .page-shell {
        background: white !important;
    }

    /* ---- Typography ---- */
    body {
        font-family: Georgia, 'Times New Roman', serif;
        font-size: 11pt;
        line-height: 1.55;
        color: #111 !important;
    }

    h1 {
        font-size: 18pt;
        margin-bottom: 14pt;
        page-break-after: avoid;
    }

    h2 {
        font-size: 13pt;
        margin-top: 18pt;
        margin-bottom: 6pt;
        page-break-after: avoid;
    }

    h3 {
        font-size: 11pt;
        margin-top: 12pt;
        page-break-after: avoid;
    }

    p {
        margin-bottom: 8pt;
        orphans: 3;
        widows: 3;
    }

    /* ---- Links: show URL in parentheses ---- */
    a[href]::after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #555 !important;
    }

    /* Exception: mailto: and tel: links — don't print the scheme prefix */
    a[href^="mailto:"]::after {
        content: " (" attr(href) ")";
    }

    a[href^="tel:"]::after {
        content: " (" attr(href) ")";
    }

    /* ---- Sensible page breaks ---- */
    .fs-article__content > * {
        page-break-inside: avoid;
    }

    /* ---- Ensure float is cleared for print ---- */
    .fs-article__title {
        clear: right;
    }

}

/* ==========================================================================
 * Legal Modal (@since 0.10.1)
 * Triggered by .legal-modal-trigger links on the checkout page.
 * Desktop: centered panel, max-width 720px, max-height 82vh.
 * Mobile (≤ 600px): full-screen sheet.
 * ========================================================================== */

/* Body lock — prevents background scroll while modal is open */
body.legal-modal-open {
  overflow: hidden;
  position: fixed;
  width: 100%;
}

/* Outer wrapper — full viewport, stacked above everything */
.legal-modal {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9000;
  align-items: center;
  justify-content: center;
}
.legal-modal.is-open {
  display: flex;
}

/* Backdrop */
.legal-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  cursor: pointer;
  animation: lm-fade-in 0.2s ease;
}

/* Panel */
.legal-modal__panel {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(720px, calc(100vw - 48px));
  max-height: 82vh;
  background: var(--card-bg, #fff);
  border-radius: 12px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.22);
  overflow: hidden;
  animation: lm-slide-up 0.25s cubic-bezier(0.22, 1, 0.36, 1);
  outline: none; /* receives programmatic focus */
}

/* Sticky header bar */
.legal-modal__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border, rgba(0,0,0,0.1));
  flex-shrink: 0;
  background: var(--card-bg, #fff);
}

.legal-modal__title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}

.legal-modal__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  min-width: 36px;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  flex-shrink: 0;
}
.legal-modal__close:hover {
  background: var(--surface-hover, rgba(0,0,0,0.06));
  color: var(--text);
}
.legal-modal__close:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

/* Scrollable body */
.legal-modal__body {
  flex: 1 1 auto;
  overflow-y: scroll; /* always-on scroll for iOS momentum */
  -webkit-overflow-scrolling: touch;
  padding: 28px 24px;
}

/* Loading state */
.legal-modal__loader {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  font-size: 0.9rem;
  padding: 24px 0;
}
.legal-modal__spinner {
  width: 20px;
  height: 20px;
  border: 2px solid var(--border, rgba(0,0,0,0.15));
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: lm-spin 0.7s linear infinite;
  flex-shrink: 0;
}

/* Injected page content — basic typography reset */
.legal-modal__content {
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text);
}
.legal-modal__content h1,
.legal-modal__content h2,
.legal-modal__content h3 {
  margin-top: 1.4em;
  margin-bottom: 0.4em;
  font-weight: 700;
  line-height: 1.3;
}
.legal-modal__content h1 { font-size: 1.2rem; }
.legal-modal__content h2 { font-size: 1.05rem; }
.legal-modal__content h3 { font-size: 0.97rem; }
.legal-modal__content p  { margin-bottom: 0.85em; }
.legal-modal__content ul,
.legal-modal__content ol {
  padding-left: 1.5em;
  margin-bottom: 0.85em;
}
.legal-modal__content a {
  color: var(--primary);
  text-decoration: underline;
}

/* ---- Mobile: full-screen sheet ---- */
@media (max-width: 600px) {
  .legal-modal {
    align-items: flex-end; /* sheet slides up from bottom */
  }

  .legal-modal__panel {
    width: 100vw;
    max-height: 92dvh; /* dvh accounts for mobile browser chrome */
    border-radius: 16px 16px 0 0;
    animation: lm-slide-up-mobile 0.3s cubic-bezier(0.22, 1, 0.36, 1);
  }

  .legal-modal__header {
    padding: 16px 20px;
  }

  /* Larger close button on mobile (44px touch target) */
  .legal-modal__close {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .legal-modal__body {
    padding: 20px 20px env(safe-area-inset-bottom, 16px);
  }
}

/* ---- Animations ---- */
@keyframes lm-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes lm-slide-up {
  from { opacity: 0; transform: translateY(24px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

@keyframes lm-slide-up-mobile {
  from { transform: translateY(100%); }
  to   { transform: translateY(0); }
}

@keyframes lm-spin {
  to { transform: rotate(360deg); }
}

/* ---- Print: modal never prints ---- */
@media print {
  .legal-modal { display: none !important; }
}

/* ==========================================================================
 * Payment — Checkout (@since 0.10.2)
 * ==========================================================================
 *
 * Styles für:
 *   - Multi-Gateway-Auswahl (Gateway-Tabs / Radio-Buttons)
 *   - Vorkasse Bankdaten-Box
 *   - Stripe Elements Container
 *   - Fehler-/Status-Karten auf checkout-payment.php & checkout-success.php
 */

/* --------------------------------------------------------------------------
 * Gateway-Auswahl (Radio-Button-Tabs)
 * -------------------------------------------------------------------------- */

.gateway-tabs {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.gateway-tab {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    border: 2px solid var(--border, #e2e8f0);
    border-radius: 8px;
    cursor: pointer;
    background: var(--surface, #fff);
    transition: border-color 0.15s, background 0.15s;
    font-size: 0.95rem;
    font-weight: 500;
}

.gateway-tab:hover {
    border-color: var(--primary, #6366f1);
}

.gateway-tab input[type="radio"] {
    accent-color: var(--primary, #6366f1);
    width: 16px;
    height: 16px;
}

.gateway-tab.is-active,
.gateway-tab:has(input:checked) {
    border-color: var(--primary, #6366f1);
    background: color-mix(in srgb, var(--primary, #6366f1) 6%, transparent);
}

/* --------------------------------------------------------------------------
 * Bankdaten-Box (Vorkasse)
 * -------------------------------------------------------------------------- */

.bank-details-box {
    background: var(--surface-alt, #f8fafc);
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 10px;
    padding: 20px 24px;
    margin-bottom: 24px;
}

.bank-details-box h3 {
    margin: 0 0 16px;
    font-size: 1rem;
    color: var(--text, #1e293b);
}

.bank-details-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.bank-details-table tr + tr td {
    padding-top: 8px;
}

.bank-details-table td:first-child {
    color: var(--text-dim, #64748b);
    width: 140px;
    vertical-align: top;
    padding-right: 16px;
}

.bank-details-table td:last-child {
    color: var(--text, #1e293b);
    font-weight: 500;
    word-break: break-word;
}

.bank-details-table .verwendungszweck {
    font-weight: 700;
    color: var(--primary, #6366f1);
    letter-spacing: 0.01em;
}

.bank-deadline {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 16px;
    padding: 8px 12px;
    background: color-mix(in srgb, var(--warning, #f59e0b) 10%, transparent);
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--warning-dark, #92400e);
}

.bank-custom-message {
    margin-top: 14px;
    padding: 10px 14px;
    background: var(--surface, #fff);
    border-left: 3px solid var(--primary, #6366f1);
    border-radius: 0 6px 6px 0;
    font-size: 0.88rem;
    color: var(--text-dim, #64748b);
    line-height: 1.5;
}

/* --------------------------------------------------------------------------
 * Stripe Elements Container
 * -------------------------------------------------------------------------- */

.stripe-elements-wrap {
    border: 1px solid var(--border, #e2e8f0);
    border-radius: 8px;
    padding: 16px;
    background: var(--surface, #fff);
    margin-bottom: 20px;
    min-height: 54px;
}

#stripe-payment-error {
    color: var(--danger, #dc3545);
    font-size: 0.88rem;
    margin-top: 10px;
    display: none;
}

#stripe-payment-error:not(:empty) {
    display: block;
}

/* --------------------------------------------------------------------------
 * Checkout-Success Status-Karten
 * -------------------------------------------------------------------------- */

.checkout-status-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 48px 32px;
    border-radius: 14px;
    background: var(--surface, #fff);
    box-shadow: 0 2px 16px rgba(0,0,0,.07);
    max-width: 560px;
    margin: 0 auto;
}

.checkout-status-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 20px;
}

.checkout-status-icon--success { background: #d1fae5; }
.checkout-status-icon--info    { background: #dbeafe; }
.checkout-status-icon--pending { background: #fef3c7; }
.checkout-status-icon--error   { background: #fee2e2; }

.checkout-status-card h2 {
    margin: 0 0 10px;
    font-size: 1.4rem;
}

.checkout-status-card p {
    color: var(--text-dim, #64748b);
    line-height: 1.6;
    margin-bottom: 8px;
}

/* Spinner für Polling-Status */
.poll-spinner {
    display: inline-block;
    width: 22px;
    height: 22px;
    border: 3px solid var(--border, #e2e8f0);
    border-top-color: var(--primary, #6366f1);
    border-radius: 50%;
    animation: poll-spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes poll-spin {
    to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
 * Checkout-Payment: Kein Gateway verfügbar
 * -------------------------------------------------------------------------- */

.no-gateway-card {
    background: color-mix(in srgb, var(--warning, #f59e0b) 8%, var(--surface, #fff));
    border: 1px solid color-mix(in srgb, var(--warning, #f59e0b) 40%, transparent);
    border-radius: 10px;
    padding: 24px;
    text-align: center;
    margin-bottom: 24px;
}

.no-gateway-card h3 {
    margin: 0 0 8px;
    color: var(--warning-dark, #92400e);
}

.no-gateway-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-dim, #64748b);
}

/* --------------------------------------------------------------------------
 * PayPal button (@since 0.10.3)
 * Uses PayPal brand colors: #FFC439 yellow, #003087 dark blue.
 * No PayPal JS SDK is loaded — this is a plain redirect link styled as a button.
 * -------------------------------------------------------------------------- */

.btn--paypal {
    display: inline-block;
    background-color: #FFC439;
    color: #003087;
    font-weight: 700;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    letter-spacing: 0.01em;
    transition: background-color 0.15s ease;
}

.btn--paypal:hover,
.btn--paypal:focus {
    background-color: #f0b429;
    color: #003087;
    text-decoration: none;
}

.btn--paypal:active {
    background-color: #d9a020;
}

.btn--full-width {
    display: block;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
 * Responsive: Mobile
 * -------------------------------------------------------------------------- */

@media (max-width: 600px) {
    .gateway-tabs {
        flex-direction: column;
    }

    .bank-details-table td:first-child {
        width: 110px;
    }

    .checkout-status-card {
        padding: 32px 20px;
    }
}


/* --------------------------------------------------------------------------
 * Produktbild-Darstellung im mock-grid (@since 0.10.95)
 * -------------------------------------------------------------------------- */

.mock-image {
    width:         100%;
    height:        100%;
    object-fit:    cover;
    border-radius: var(--radius-sm);
    display:       block;
}

/* --------------------------------------------------------------------------
 * Carousel — Pfeil-Navigation ‹ › (@since 0.10.96)
 * -------------------------------------------------------------------------- */

/* Dekorativ (0–3 Bilder): kein Klick-Cursor */
.mock-nav__prev,
.mock-nav__next {
    color:       var(--text-dim);
    font-size:   1.6rem;
    line-height: 1;
    cursor:      default;
    user-select: none;
}

/* Aktiv bei ≥ 4 Bildern */
.mock-window--carousel .mock-nav__prev,
.mock-window--carousel .mock-nav__next {
    cursor:     pointer;
    color:      var(--text-soft);
    transition: color 0.15s ease;
}

.mock-window--carousel .mock-nav__prev:hover,
.mock-window--carousel .mock-nav__next:hover {
    color: var(--primary);
}

/* Bild-Übergangsanimation */
.mock-image.is-fading {
    opacity: 0;
}

/* --------------------------------------------------------------------------
 * Lightbox (@since 0.10.96)
 * -------------------------------------------------------------------------- */

.fs-lightbox {
    display:         none;
    position:        fixed;
    inset:           0;
    background:      rgba(0, 0, 0, 0.88);
    z-index:         9999;
    align-items:     center;
    justify-content: center;
}

.fs-lightbox.is-open {
    display: flex;
}

.fs-lightbox__img {
    max-width:     90vw;
    max-height:    90vh;
    object-fit:    contain;
    border-radius: var(--radius-sm);
    box-shadow:    0 8px 40px rgba(0, 0, 0, 0.6);
}

.fs-lightbox__close {
    position:    absolute;
    top:         20px;
    right:       24px;
    background:  transparent;
    border:      none;
    color:       #fff;
    font-size:   2rem;
    cursor:      pointer;
    line-height: 1;
    padding:     4px 8px;
    opacity:     0.8;
    transition:  opacity 0.15s ease;
}

.fs-lightbox__close:hover {
    opacity: 1;
}

/* Mobile: Lightbox Vollbild */
@media (max-width: 600px) {
    .fs-lightbox {
        background: #000;
    }

    .fs-lightbox__img {
        max-width:     100vw;
        max-height:    100vh;
        border-radius: 0;
    }

    .fs-lightbox__close {
        top:       12px;
        right:     16px;
        font-size: 1.75rem;
    }
}


/* ============================================================
   Design & Layout — Modifier Classes (@since 0.13.0)

   Strategy: additive body-class modifiers — NEVER override
   existing component rules. Only add rule sets keyed to
   .fs-* body classes. Default variants (comfortable, normal,
   soft, rounded, etc.) require no rules because the existing
   base.css + tokens.css already implement them.
   ============================================================ */

/* ----------------------------------------------------------
   Block A — Global Layout Basis
   ---------------------------------------------------------- */

/* Compact density: tighter card + section padding */
.fs-density-compact .card                    { padding: 16px; }
.fs-density-compact .section                 { padding-block: 32px; }
.fs-density-compact .hero                    { padding-block: 32px; }

/* Wide content: broader container */
.fs-content-wide .container                  { max-width: 1320px; }

/* Large section spacing */
.fs-spacing-large .section                   { padding-block: 96px; }
.fs-spacing-large .hero                      { padding-block: 96px; }

/* Card styles */
.fs-card-clean .card                         { border: none; }
.fs-card-outlined .card                      { border-width: 2px; border-radius: 4px; }

/* Button styles */
.fs-btn-clean  .btn                          { border-radius: 6px; }
.fs-btn-strong .btn                          { border-radius: 0; }

/* Form styles */
.fs-form-compact .form-control               { padding-block: 6px; }

/* ----------------------------------------------------------
   Block B — Typography
   ---------------------------------------------------------- */

/* Large font scale: ~10% larger base */
.fs-font-large                               { font-size: 110%; }

/* Strong heading weight */
.fs-heading-strong h1,
.fs-heading-strong h2,
.fs-heading-strong h3                        { font-weight: 800; }

/* Narrow body width: limit prose to ~65ch */
.fs-body-narrow .fs-article__content,
.fs-body-narrow .hero__page-content          { max-width: 65ch; }

/* Hero text alignment — centered variant */
.fs-hero-center .hero__content               { text-align: center; align-items: center; }
.fs-hero-center .hero__actions               { justify-content: center; }
.fs-hero-center .hero__eyebrow               { margin-inline: auto; }

/* ----------------------------------------------------------
   Block C — Header & Footer
   ---------------------------------------------------------- */

/* Header: centered layout */
.fs-header-centered .site-header__inner      { justify-content: center; gap: 32px; }

/* Header: compact layout */
.fs-header-compact .site-header             { padding-block: 8px; }
.fs-header-compact .brand__mark             { width: 28px; height: 28px; }

/* Header: disable sticky */
.fs-header-no-sticky .site-header           { position: static; }

/* Footer: compact single-line layout */
.fs-footer-compact .footer-grid             { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; }
.fs-footer-compact .footer-col              { min-width: 0; }
.fs-footer-compact .footer-col .footer-col__title { display: none; }

/* ----------------------------------------------------------
   Block D — Home page: Feature cards section
   ---------------------------------------------------------- */

.fs-feature-grid {
    display:               grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap:                   24px;
    margin-block-start:    8px;
}

.fs-feature-card                             { text-align: center; padding: 32px 24px; }
.fs-feature-card__icon                       { font-size: 2rem; display: block; margin-block-end: 12px; }
.fs-feature-card h3                          { margin-block-end: 8px; }
.fs-feature-card p                           { color: var(--text-soft); margin: 0; }

/* ----------------------------------------------------------
   Block E — Product list
   ---------------------------------------------------------- */

/* List layout: vertical stacked product entries */
.fs-list-list .product-list                  { display: flex; flex-direction: column; gap: 16px; }
.fs-list-list .product-card                  { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 16px; }
.fs-list-list .product-card__head            { margin-block-end: 0; }

/* Square image ratio */
.fs-card-ratio-square .product-card__image   { aspect-ratio: 1 / 1; }

/* ----------------------------------------------------------
   Block F — Product detail: stacked info layout + gallery
   ---------------------------------------------------------- */

/* Stacked info layout: hero__grid single-column for product detail */
.fs-detail-stacked .hero .hero__grid {
    grid-template-columns: 1fr;
}
.fs-detail-stacked .hero .hero__visual       { display: none; }

/* Stacked gallery */
.fs-gallery-stacked {
    display:        flex;
    flex-direction: column;
    gap:            12px;
    width:          100%;
}

.fs-gallery-stacked__img {
    width:         100%;
    height:        auto;
    border-radius: var(--radius, 8px);
    display:       block;
}

.fs-gallery-stacked--empty {
    min-height: 200px;
}

/* ----------------------------------------------------------
   Secondary CTA button variant (btn--outline, if not in base)
   ---------------------------------------------------------- */

.btn--outline {
    background:    transparent;
    border:        2px solid var(--primary);
    color:         var(--primary);
    border-radius: inherit;
}

.btn--outline:hover {
    background: var(--primary-a10);
}


/* ============================================================
   Design & Layout — Mobile Fixes (@since 0.13.1)

   Six gaps identified during mobile QA of v0.13.0 modifier
   classes. All rules are scoped to @media breakpoints and
   never affect desktop behaviour.
   ============================================================ */

/* ----------------------------------------------------------
   Fix 1 — fs-hero-center: align-items:center needs flex context
   Without display:flex + flex-direction:column on the content
   block, align-items:center has no effect on a block element.
   ---------------------------------------------------------- */
@media (max-width: 760px) {
    .fs-hero-center .hero__content {
        display:        flex;
        flex-direction: column;
    }
}

/* ----------------------------------------------------------
   Fix 2 — fs-header-compact: logo too small on mobile
   28px (desktop compact) → 40px on narrow screens for
   legibility and touch target size.
   ---------------------------------------------------------- */
@media (max-width: 760px) {
    .fs-header-compact .brand__mark {
        width:  40px;
        height: 40px;
    }
}

/* ----------------------------------------------------------
   Fix 3 — fs-spacing-large: 96px padding-block excessive
   on mobile. Halve it to 48px so content remains accessible
   without excessive scrolling on 360-760px screens.
   ---------------------------------------------------------- */
@media (max-width: 760px) {
    .fs-spacing-large .section,
    .fs-spacing-large .hero {
        padding-block: 48px;
    }
}

/* ----------------------------------------------------------
   Fix 4 — fs-list-list: 2-col product grid breaks at ≤480px
   Force single-column on very narrow screens.
   ---------------------------------------------------------- */
@media (max-width: 480px) {
    .fs-list-list .product-list {
        grid-template-columns: 1fr;
    }
}

/* ----------------------------------------------------------
   Fix 5 — fs-header-centered: 32px gap too wide at 320px
   Reduce to 16px on very narrow screens.
   ---------------------------------------------------------- */
@media (max-width: 480px) {
    .fs-header-centered .site-header__inner {
        gap: 16px;
    }
}

/* ----------------------------------------------------------
   Fix 6 — fs-font-large: 110% base causes form input overflow
   at 320px. Reset inputs to browser default (100%) so they
   stay within their containers.
   ---------------------------------------------------------- */
@media (max-width: 480px) {
    .fs-font-large input,
    .fs-font-large textarea,
    .fs-font-large select {
        font-size: 1rem;
    }
}


/* ============================================================
   Mobile Slider — fs-mobile-slider (@since 0.13.3)

   Full-width image slider shown on mobile instead of the
   mock-window frame. Built by mobile-slider.js at runtime.
   Desktop is completely unaffected — all rules are inside
   @media (max-width: 760px) or scoped to .fs-mobile-slider.
   ============================================================ */

.fs-mobile-slider {
    position:      relative;
    width:         100%;
    border-radius: var(--radius, 8px);
    overflow:      hidden;
    background:    var(--bg-card-a92, #1a1a2e);
    margin-block:  4px;
}

.fs-mobile-slider__img {
    display:       none;
    width:         100%;
    height:        auto;
    border-radius: var(--radius, 8px);
    vertical-align: bottom; /* remove inline-block gap */
}

.fs-mobile-slider__img.is-active {
    display: block;
}

/* Prev / Next arrow buttons — overlaid on the image */
.fs-mobile-slider__btn {
    position:        absolute;
    top:             50%;
    transform:       translateY(-50%);
    width:           36px;
    height:          36px;
    border-radius:   50%;
    border:          none;
    background:      rgba(0, 0, 0, 0.45);
    color:           #fff;
    font-size:       1.5rem;
    line-height:     1;
    cursor:          pointer;
    display:         flex;
    align-items:     center;
    justify-content: center;
    padding:         0;
    z-index:         2;
    touch-action:    manipulation;
    transition:      background 0.15s ease;
}

.fs-mobile-slider__btn:hover,
.fs-mobile-slider__btn:focus-visible {
    background: rgba(0, 0, 0, 0.70);
}

.fs-mobile-slider__btn--prev { left:  8px; }
.fs-mobile-slider__btn--next { right: 8px; }

/* Counter badge — "2 / 5" in bottom centre */
.fs-mobile-slider__counter {
    position:      absolute;
    bottom:        8px;
    left:          50%;
    transform:     translateX(-50%);
    background:    rgba(0, 0, 0, 0.50);
    color:         #fff;
    font-size:     11px;
    font-weight:   600;
    letter-spacing: 0.04em;
    padding:       2px 10px;
    border-radius: 10px;
    pointer-events: none;
    white-space:   nowrap;
}


/* ============================================================
   Hamburger Navigation — Mobile (@since 0.13.4)

   Replaces the v0.8.1 two-column touch grid with a classic
   hamburger toggle. Desktop is completely unchanged.
   ============================================================ */

/* Global: toggle button hidden on desktop (shown via media query below) */
.nav-toggle {
    display: none;
}

@media (max-width: 760px) {

    /* ---- Header: disable v0.8.1 wrapping, enable relative positioning
           so the dropdown nav can use position:absolute below it ---- */
    .site-header__inner {
        flex-wrap:   nowrap;
        position:    relative;
        align-items: center;
    }

    /* ---- Hamburger button ---- */
    .nav-toggle {
        display:         flex;
        flex-direction:  column;
        justify-content: center;
        gap:             5px;
        width:           40px;
        height:          40px;
        margin-left:     auto;
        flex-shrink:     0;
        background:      transparent;
        border:          none;
        cursor:          pointer;
        padding:         9px;
        border-radius:   var(--radius-sm, 6px);
        transition:      background 0.15s ease;
        touch-action:    manipulation;
    }

    .nav-toggle:hover,
    .nav-toggle:focus-visible {
        background: rgba(255, 255, 255, 0.06);
    }

    .nav-toggle__bar {
        display:       block;
        width:         22px;
        height:        2px;
        background:    var(--text-nav, #b4c0e0);
        border-radius: 2px;
        transition:    transform 0.2s ease, opacity 0.2s ease;
    }

    /* Animate bars to X when open */
    body.nav-is-open .nav-toggle__bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    body.nav-is-open .nav-toggle__bar:nth-child(2) {
        opacity: 0;
        transform: scaleX(0);
    }
    body.nav-is-open .nav-toggle__bar:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    /* ---- Main nav: override v0.8.1 grid, hidden by default ---- */
    .main-nav {
        /* Reset v0.8.1 grid */
        display:               none;
        grid-template-columns: unset;
        order:                 unset;
        width:                 100%;

        /* Dropdown: full-width below header */
        position:              absolute;
        top:                   100%;
        left:                  0;
        right:                 0;
        flex-direction:        column;
        gap:                   0;
        padding:               8px 0 12px;

        /* Visual */
        background:            var(--bg-surface, #0d1426);
        border-bottom:         1px solid var(--line, rgba(114, 146, 255, 0.15));
        backdrop-filter:       blur(12px);
        -webkit-backdrop-filter: blur(12px);
        z-index:               200;
    }

    /* Open state */
    body.nav-is-open .main-nav {
        display: flex;
    }

    /* ---- Nav links: vertical, full-width, generous touch targets ---- */
    .main-nav a {
        display:        block;
        width:          100%;
        min-height:     48px;
        padding:        12px 20px;
        text-align:     left;
        justify-content: flex-start;
        border-radius:  0;
        background:     transparent;
        border:         none;
        font-size:      1rem;
        color:          var(--text-nav, #b4c0e0);
        transition:     background 0.12s ease, color 0.12s ease;
    }

    .main-nav a:hover {
        background: rgba(255, 255, 255, 0.05);
        color:      var(--text-heading, #eef3ff);
    }

    .main-nav a.is-active {
        background: rgba(255, 255, 255, 0.07);
        color:      var(--primary, #5fa8ff);
        font-weight: 600;
    }
}

/* ==========================================================================
   Block-Builder — Image Grid (@since 0.13.92_2)

   Responsive two-column grid for B13 (image_grid) and B14 (image_grid_portrait).
   Using a CSS class instead of inline styles allows media queries to take effect.
   On screens <= 600px both columns stack to a single full-width column.
   ========================================================================== */

.fs-block-ig-grid {
    display:               grid;
    grid-template-columns: 1fr 1fr;
    gap:                   16px;
}

@media (max-width: 600px) {
    .fs-block-ig-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   Support-Seite Hero Visual Slots (@since 0.13.96, updated 0.13.97, 0.13.98)

   Three configurable slots (S1 left large, S2/S3 right stacked) inside the
   hero__visual mock-window on the support page.

   Image slot (.fs-support-slot__img):
     Fills the parent mock-grid cell with object-fit: cover.

   Text slot (.fs-support-slot__text + .meta-card):
     Uses .meta-card for typography (strong/span) — fully Design-System-aware,
     all sizes via rem/CSS variables. No hardcoded font sizes.
     S1 uses flex column + space-between: the 3 content blocks (.fs-support-slot__block)
     distribute adaptively to fill the full slot height. Spacing between blocks
     expands/contracts depending on available vertical space.

   Block wrapper (.fs-support-slot__block):
     One wrapper per Überschrift+Freitext pair in S1. Acts as a flex item inside
     .fs-support-slot__text. Only rendered when the block has content.

   Fallback icon (.fs-support-slot__icon-fallback):
     Shown in S2 when no image and no text configured. Inline SVG headset icon,
     coloured via var(--accent). Hidden if user provides image or text.

   Empty slot (.fs-support-slot__empty):
     Renders .card border / background with no content — used by S1/S3 when empty.

   Mobile Slot-Stack (.fs-support-slot-stack):
     Hidden on desktop; shown on mobile when NOT all 3 slots carry images.
   ========================================================================== */

/* ---- Image slots ---- */
.fs-support-slot__img {
    display:       block;
    width:         100%;
    height:        100%;
    object-fit:    cover;
    border-radius: var(--radius, 12px);
}

/* ---- Text slots (.meta-card is the typography container) ----
   Extends .meta-card: fills the cell, scrolls on overflow.
   S1 uses flex column + justify-content: space-between so the three
   .fs-support-slot__block items distribute evenly across the full slot
   height — spacing adapts automatically to available space. (@since 0.13.98)
   Typography (strong/span font sizes) comes entirely from .meta-card in base.css
   and scales with the Design System — no hardcoded values here. */
.fs-support-slot__text {
    width:           100%;
    height:          100%;
    overflow-y:      auto;
    box-sizing:      border-box;
    display:         flex;
    flex-direction:  column;
    justify-content: space-between;
}

/* ---- S1 block wrappers (@since 0.13.98) ----
   Each Überschrift+Freitext pair sits in its own flex item.
   No fixed height — content drives natural size; space-between distributes gap. */
.fs-support-slot__block {
    /* flex item — no additional sizing needed */
}

/* Equal spacing within a block: gap after Freitext → next Überschrift equals
   the existing .meta-card span margin-top (6px → heading→text gap).
   Retained for S2/S3 flat markup and for future multi-pair blocks. */
.fs-support-slot__text span + strong {
    margin-top: 6px;
}

/* ---- S2 fallback icon (@since 0.13.97) ---- */
.fs-support-slot__icon-fallback {
    display:         flex;
    align-items:     center;
    justify-content: center;
    width:           100%;
    height:          100%;
    color:           var(--accent, #7292ff);
    opacity:         0.55;
}

/* ---- Empty slots (S1/S3 when no image and no text) ---- */
.fs-support-slot__empty {
    width:  100%;
    height: 100%;
}

/* ---- Mobile Slot-Stack ---- */
.fs-support-slot-stack {
    display: none; /* hidden on desktop; revealed by media query below */
}

@media (max-width: 860px) {
    /* On mobile, hide the mock-window (fall B: not all images) */
    .hero__visual .mock-window:not(.fs-support-all-images) {
        display: none;
    }

    /* Show stacked cards in place of mock-window */
    .fs-support-slot-stack {
        display:        flex;
        flex-direction: column;
        gap:            12px;
        width:          100%;
    }

    /* Full-width images inside stacked cards */
    .fs-support-slot-stack .fs-support-slot__img {
        height: auto;
    }
}

/* ==========================================================================
   v0.18.x — SEO-Modul: Breadcrumb-Navigation
   Klassen: .breadcrumb-nav, .breadcrumb-list, .breadcrumb-item,
            .breadcrumb-item--active, .breadcrumb-item__link,
            .breadcrumb-item__sep, .breadcrumb-item__current
   @since 0.18.0
   @since 0.18.4  CSS-Regeln hinzugefügt (fehlten in v0.18.0)
   ========================================================================== */

.breadcrumb-nav {
    padding: 10px 0;
}

.breadcrumb-list {
    display:     flex;
    flex-wrap:   wrap;
    align-items: center;
    gap:         4px;
    list-style:  none;
    margin:      0;
    padding:     0;
    font-size:   0.8rem;
    color:       var(--text-muted, #7f8db1);
}

.breadcrumb-item {
    display:     flex;
    align-items: center;
    gap:         4px;
}

.breadcrumb-item__link {
    color:           var(--text-muted, #7f8db1);
    text-decoration: none;
    transition:      color 0.15s;
}

.breadcrumb-item__link:hover {
    color: var(--primary, #5fa8ff);
}

.breadcrumb-item__sep {
    color:     var(--text-muted, #7f8db1);
    opacity:   0.5;
    font-size: 0.75rem;
}

.breadcrumb-item__current {
    color: var(--text-body, #b4c0e0);
}

.breadcrumb-item--active {
    font-weight: 500;
}

/* ============================================================
   rich_text-Block — Quill WYSIWYG Frontend-Ausgabe
   @since 0.18.96
   @since 0.18.97  Abstand-Fix (fs-rich-text__panel), Farb-Fix h1-h6,
                   first-child margin-top-Reset.
   @since 0.18.98  Abstand zwischen Überschrift und erstem Absatz reduziert:
                   h1-h6: margin-bottom: 0.5em (Browser-Default ~0.83em → kleiner).
                   Leere Quill-Absätze <p><br></p> werden kollabiert
                   (margin: 0; line-height: 0; height: 0; overflow: hidden).

   Die section.hero-Wrapper-Klasse bringt aus base.css folgende
   Regeln mit, die für rich_text-Inhalte unerwünscht sind:
     .hero p { color: var(--text-soft); max-width: 62ch; margin: 18px 0 0; }
     .hero__content { padding: 36px }  → zu großer oberer Abstand vor Überschriften

   Korrekturen für .fs-rich-text (Farbe, Breite, Abstände):
     - p: color: var(--text)   → Basis-Fließtextfarbe (Inline-Farben per Spezifität drüber)
     - p: max-width: none      → volle Panel-Breite
     - p: margin: 0 0 1em      → konsistenter Absatzabstand
     - h1-h6: color: var(--text) + max-width: none (übersteuert Basis-Regeln)
     - h1-h6: margin-bottom: 0.5em → Abstand nach Überschrift kompakt (@since 0.18.98)
     - > *:first-child: margin-top: 0 → kein Extra-Abstand vor dem ersten Element

   Korrekturen für .fs-rich-text__panel (Panel-Padding):
     - padding-top: 20px statt 36px → Überschrift näher am oberen Rand (@since 0.18.97)
   ============================================================ */

.fs-rich-text p {
    color:     var(--text);
    max-width: none;
    margin:    0 0 1em;
}

.fs-rich-text h1,
.fs-rich-text h2,
.fs-rich-text h3,
.fs-rich-text h4,
.fs-rich-text h5,
.fs-rich-text h6 {
    color:         var(--text);
    max-width:     none;
    margin-bottom: 0.5em;
}

/* Kein extra Abstand vor dem allerersten Element im Block */
.fs-rich-text > *:first-child {
    margin-top: 0;
}

/* Leere Quill-Absätze <p><br></p> kollabieren — Quill fügt diese als
   Trennzeichen zwischen Blöcken ein; sie würden sonst ~40 px extra Abstand
   erzeugen (line-height + margin-bottom). (@since 0.18.98) */
.fs-rich-text p:has(> br:only-child) {
    margin:      0;
    line-height: 0;
    height:      0;
    overflow:    hidden;
}

/* Panel-Padding reduziert: Überschrift soll näher am oberen Rand sein (@since 0.18.97) */
.fs-rich-text__panel.hero__content {
    padding-top: 20px;
}

/* ---- Lightbox Overlay (@since FS2 v0.49.5) ---- */
#fs-lightbox-overlay {
    position:        fixed;
    inset:           0;
    z-index:         9999;
    background:      rgba(0, 0, 0, 0.88);
    display:         flex;
    align-items:     center;
    justify-content: center;
    opacity:         0;
    pointer-events:  none;
    transition:      opacity 0.2s ease;
}

#fs-lightbox-overlay.fs-lightbox--active {
    opacity:        1;
    pointer-events: all;
}

#fs-lightbox-img {
    max-width:    95vw;
    max-height:   95vh;
    object-fit:   contain;
    border-radius: 4px;
    box-shadow:   0 8px 40px rgba(0, 0, 0, 0.6);
    display:      block;
    cursor:       zoom-out;
}

[data-lightbox] {
    cursor: zoom-in;
}
