/* Design system for the Simple Locale product site (/simplelocale/*.php)
   and the shop (/shop/*.php) - shares the gold accent from the homepage's
   main.css for brand recognition, but a light, conventional SaaS-product
   layout instead of the homepage's dark glassmorphism business card
   (that look is tuned for "Kai as a consultant", not a software product).
*/

:root {
    --sl-gold: #D4AF37;
    --sl-gold-rgb: 212, 175, 55;
    --sl-text: #1a1a1a;
    --sl-text-muted: #5a5a5a;
    --sl-bg: #ffffff;
    --sl-bg-alt: #f7f6f3;
    --sl-border: #e5e2da;
    --sl-radius: 10px;
}

* { box-sizing: border-box; }

body.sl {
    margin: 0;
    font-family: 'Helvetica Neue', Arial, sans-serif;
    color: var(--sl-text);
    background: var(--sl-bg);
    line-height: 1.6;
}

.sl-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 24px;
}

/* --- Header / nav --- */
/* Sprungziele muessen unter dem klebenden Kopf (64px) anfangen, sonst
   landet die Ueberschrift dahinter und der Leser sieht mitten im Text auf. */
.sl-docs [id] { scroll-margin-top: 88px; }

/* Dasselbe fuer die FAQ: ein Sprung aus einem Forumslink darf die Frage nicht
   hinter dem klebenden Kopf parken. */
.sl-faq-item { scroll-margin-top: 88px; }

/* Das Rautezeichen zum Kopieren eines Links auf genau diese Frage - dezent,
   bis man die Frage anfaehrt. */
.sl-faq-anchor { margin-left: 8px; color: var(--sl-text-muted); text-decoration: none;
                 font-weight: 400; opacity: 0; transition: opacity 0.15s ease; }
.sl-faq-item:hover .sl-faq-anchor, .sl-faq-anchor:focus { opacity: 1; }
.sl-faq-anchor:hover { color: var(--sl-gold); }

.sl-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid var(--sl-border);
}
.sl-header .sl-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 64px;
}
.sl-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 1.05em;
    color: var(--sl-text);
    text-decoration: none;
}
.sl-logo img { height: 46px; width: auto; }
.sl-nav { display: flex; gap: 28px; align-items: center; position: relative; }
.sl-nav-links { display: flex; gap: 28px; align-items: center; }
.sl-nav a {
    color: var(--sl-text-muted);
    text-decoration: none;
    font-size: 0.95em;
    transition: color 0.15s;
}
.sl-nav a:hover, .sl-nav a.active { color: var(--sl-text); }
.sl-nav a.sl-nav-cta {
    background: var(--sl-gold);
    color: #1a1a1a;
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 600;
}
.sl-nav a.sl-nav-cta:hover { background: #c19d2e; }
.sl-nav-cta-icon { display: none; }

.sl-flags { display: flex; gap: 4px; }
.sl-flag-button {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    font-size: 1.1em;
    padding: 4px 6px;
    cursor: pointer;
    line-height: 1;
    opacity: 0.55;
    transition: opacity 0.15s, border-color 0.15s;
}
.sl-flag-button:hover { opacity: 0.85; }
.sl-flag-button.active { opacity: 1; border-color: var(--sl-border); }

/* Nav/flags overflow menus - hidden entirely until the header runs out of
   horizontal room (see the max-width media query below), since flex-wrap
   alone left the nav links and flag row overlapping/clipping instead of
   collapsing into something still reachable (see bug report screenshot). */
.sl-flags-toggle, .sl-nav-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--sl-border);
    border-radius: 6px;
    padding: 5px 10px;
    font-size: 0.95em;
    line-height: 1.4;
    cursor: pointer;
    color: var(--sl-text);
}
.sl-caret { font-size: 0.7em; }

/* --- Hero --- */
.sl-hero {
    padding: 72px 0 56px;
    text-align: center;
    background: linear-gradient(180deg, var(--sl-bg-alt) 0%, var(--sl-bg) 100%);
    border-bottom: 1px solid var(--sl-border);
}
.sl-hero h1 {
    font-size: 2.4em;
    font-weight: 700;
    margin: 0 0 16px;
    letter-spacing: -0.01em;
}
.sl-hero p.sl-lead {
    font-size: 1.15em;
    color: var(--sl-text-muted);
    max-width: 640px;
    margin: 0 auto 32px;
}
.sl-hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

/* --- Buttons --- */
.sl-btn {
    display: inline-block;
    padding: 12px 26px;
    border-radius: 6px;
    font-size: 1em;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.sl-btn-primary { background: var(--sl-gold); color: #1a1a1a; }
.sl-btn-primary:hover { background: #c19d2e; }
.sl-btn-secondary { background: transparent; color: var(--sl-text); border: 1px solid var(--sl-border); }
.sl-btn-secondary:hover { border-color: var(--sl-gold); }

/* --- Generic section --- */
.sl-section { padding: 56px 0; }
.sl-section h2 {
    font-size: 1.7em;
    font-weight: 700;
    text-align: center;
    margin: 0 0 12px;
}
.sl-section p.sl-section-lead {
    text-align: center;
    color: var(--sl-text-muted);
    max-width: 620px;
    margin: 0 auto 40px;
}

/* --- Feature grid --- */
.sl-feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}
.sl-feature-card {
    background: var(--sl-bg-alt);
    border: 1px solid var(--sl-border);
    border-radius: var(--sl-radius);
    padding: 24px;
}
.sl-feature-card .sl-feature-icon { font-size: 1.6em; margin-bottom: 12px; display: block; }
.sl-feature-card h3 { margin: 0 0 8px; font-size: 1.1em; display: inline-block; }
.sl-feature-card p { margin: 0; color: var(--sl-text-muted); font-size: 0.95em; }

/* --- Feature table (one row per feature, for easy comparison) --- */
.sl-feature-table {
    border-top: 1px solid var(--sl-border);
}
.sl-feature-row {
    display: flex;
    align-items: baseline;
    gap: 20px;
    padding: 18px 4px;
    border-bottom: 1px solid var(--sl-border);
}
.sl-feature-row .sl-feature-icon {
    flex: 0 0 28px;
    font-size: 1.3em;
    line-height: 1;
    align-self: flex-start;
}
.sl-feature-row .sl-feature-title {
    flex: 0 0 220px;
    margin: 0;
    font-size: 1.05em;
    font-weight: 700;
}
.sl-feature-row p {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    color: var(--sl-text-muted);
    font-size: 0.95em;
}
@media (max-width: 720px) {
    .sl-feature-row { flex-wrap: wrap; }
    .sl-feature-row .sl-feature-title { flex-basis: 100%; }
    .sl-feature-row p { flex-basis: 100%; margin-left: 48px; width: calc(100% - 48px); }
}

/* --- Known limitations list --- */
.sl-limitations-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    max-width: 920px;
    margin: 0 auto;
}
.sl-limitation-item {
    padding: 16px 20px;
    border-left: 3px solid var(--sl-gold);
    background: var(--sl-bg-alt);
    border-radius: 0 var(--sl-radius) var(--sl-radius) 0;
}
.sl-limitation-item h3 { margin: 0 0 6px; font-size: 1em; }
.sl-limitation-item p { margin: 0; color: var(--sl-text-muted); font-size: 0.92em; }

/* --- FAQ list (accordion via native <details>/<summary> - no JS needed,
   keyboard/screen-reader accessible for free) --- */
.sl-faq-list {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
/* Ueberschrift ueber einer Gruppe von Fragen. Sie steht zwischen den
   Eintraegen, deshalb der grosszuegige Abstand nach oben - beim ersten
   Eintrag waere er zu viel, dort nimmt ihn die Regel darunter wieder weg. */
/* Zwei Klassen, damit die Regel .sl-section h2 nicht gewinnt - die macht aus
   jeder h2 eine grosse, zentrierte Abschnittsueberschrift. */
/* Suchfeld ueber einer Auswahlliste (Editionen, Designs). */
.sl-admin-list-search { display: flex; gap: 4px; margin-bottom: 8px; }
.sl-admin-list-search input {
    flex: 1;
    min-width: 0;
    font-family: inherit;
    font-size: 0.85em;
    padding: 5px 8px;
    border: 1px solid var(--sl-border);
    border-radius: 4px;
    background: var(--sl-bg);
}
.sl-admin-list-search button {
    padding: 4px 9px;
    font-size: 0.9em;
    cursor: pointer;
    border: 1px solid var(--sl-border);
    border-radius: 4px;
    background: var(--sl-bg);
}
.sl-admin-list-search button:hover { border-color: var(--sl-gold); }

/* Die Bereichsauswahl in einer Tabellen-Kopfzeile: zwei Vergleichszeichen mit
   je einem Zahlenfeld. Zwei Zeilen zu je einem Paar - nebeneinander wuerde die
   Spalte sonst breiter als ihr Inhalt. */
.sl-th-amount { display: grid; grid-template-columns: auto 1fr; gap: 3px 4px; align-items: center; }
.sl-th-amount select { padding: 1px 2px; }
.sl-th-amount input { width: 100%; min-width: 52px; }

.sl-faq-list .sl-faq-group {
    margin: 26px 0 2px;
    text-align: left;
    font-size: 0.82em;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--sl-text-muted);
}
.sl-faq-list .sl-faq-group:first-child { margin-top: 0; }
.sl-faq-item {
    border-left: 3px solid var(--sl-gold);
    background: var(--sl-bg-alt);
    border-radius: 0 var(--sl-radius) var(--sl-radius) 0;
    overflow: hidden;
}
.sl-faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 16px 22px;
    font-size: 1.05em;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.sl-faq-item summary::-webkit-details-marker { display: none; }
.sl-faq-item summary:hover { color: var(--sl-text-muted); }
.sl-faq-item summary .sl-caret { transition: transform 0.15s; flex-shrink: 0; }
.sl-faq-item[open] summary .sl-caret { transform: rotate(180deg); }
.sl-faq-item .sl-faq-answer { padding: 0 22px 16px; }
.sl-faq-item p { margin: 0 0 8px; color: var(--sl-text-muted); font-size: 0.95em; }
.sl-faq-item p:last-child { margin-bottom: 0; }

/* --- Video placeholder --- */
.sl-video-placeholder {
    max-width: 720px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    background: var(--sl-bg-alt);
    border: 1px dashed var(--sl-border);
    border-radius: var(--sl-radius);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--sl-text-muted);
    gap: 8px;
}
.sl-video-placeholder .sl-video-icon { font-size: 2.4em; }

.sl-video {
    display: block;
    max-width: 720px;
    width: 100%;
    margin: 0 auto;
    border-radius: var(--sl-radius);
    border: 1px solid var(--sl-border);
    background: #000;
}

/* --- Pricing --- */
.sl-pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    align-items: stretch;
}
.sl-price-card {
    background: var(--sl-bg);
    border: 1px solid var(--sl-border);
    border-radius: var(--sl-radius);
    padding: 28px 24px;
    display: flex;
    flex-direction: column;
    position: relative; /* Bezugspunkt fuer das Schildchen unten */
}
.sl-price-card.sl-price-featured {
    border-color: var(--sl-gold);
    box-shadow: 0 0 0 1px var(--sl-gold), 0 8px 24px rgba(var(--sl-gold-rgb), 0.15);
}
/* Schildchen ueber der Oberkante - haengt am data-badge, nicht mehr an der
   hervorgehobenen Karte, damit es auch der Editionsvergleich auf der
   Upgrade-Seite nutzen kann. */
.sl-price-card[data-badge]::before {
    content: attr(data-badge);
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--sl-gold);
    color: #1a1a1a;
    font-size: 0.75em;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 999px;
}
.sl-price-card h3 { margin: 0 0 4px; font-size: 1.2em; }
.sl-price-card .sl-price {
    font-size: 2em;
    font-weight: 700;
    margin: 12px 0 4px;
}
.sl-price-card .sl-price-sub { color: var(--sl-text-muted); font-size: 0.85em; margin-bottom: 20px; }
.sl-price-card ul { list-style: none; margin: 0 0 24px; padding: 0; flex-grow: 1; }
.sl-price-card ul li {
    padding: 7px 0;
    border-bottom: 1px solid var(--sl-border);
    font-size: 0.92em;
    display: flex;
    gap: 8px;
}
.sl-price-card ul li:last-child { border-bottom: none; }
.sl-price-card ul li.sl-not-included { color: var(--sl-text-muted); }
.sl-price-card .sl-btn { text-align: center; }

/* --- Comparison matrix (pricing.php) --- */
.sl-matrix-wrap { overflow-x: auto; }
table.sl-matrix { width: 100%; border-collapse: collapse; min-width: 480px; }
table.sl-matrix th, table.sl-matrix td { padding: 10px 14px; border-bottom: 1px solid var(--sl-border); text-align: center; }
table.sl-matrix th { font-size: 0.95em; }
table.sl-matrix td:first-child, table.sl-matrix th:first-child { text-align: left; font-weight: 600; }
table.sl-matrix tr:first-child th { border-bottom: 2px solid var(--sl-text); }
.sl-matrix .sl-yes { color: #1a7a3c; font-weight: 700; }
.sl-matrix .sl-no { color: var(--sl-text-muted); }
.sl-matrix-footnote { margin-top: 14px; color: var(--sl-text-muted); font-size: 0.85em; }

/* --- Upgrade-license upsell box (shop/index.php, pricing.php, resend-license.php) --- */
.sl-upsell-box {
    margin-top: 32px;
    padding: 20px 24px;
    border: 1px solid var(--sl-gold);
    border-radius: var(--sl-radius);
    background: rgba(var(--sl-gold-rgb), 0.08);
    text-align: center;
}
.sl-upsell-box h3 { margin: 0 0 8px; font-size: 1.05em; }
.sl-upsell-box p { margin: 0 0 16px; color: var(--sl-text); }
.sl-upsell-box p a { color: var(--sl-gold); font-weight: 600; }
.sl-upsell-box.sl-upsell-prominent {
    padding: 28px 24px;
    box-shadow: 0 0 0 1px var(--sl-gold), 0 8px 24px rgba(var(--sl-gold-rgb), 0.15);
}
.sl-upsell-box.sl-upsell-prominent h2 { margin: 0 0 10px; font-size: 1.3em; }
.sl-upsell-box.sl-upsell-prominent p { color: var(--sl-text-muted); margin-bottom: 18px; font-size: 0.98em; }
.sl-upsell-box.sl-upsell-prominent .sl-btn { display: inline-block; }

/* --- Promo banner (shop/index.php) - free-form admin HTML, e.g. a
   holiday-campaign announcement above the pricing cards --- */
.sl-promo-banner {
    margin: 24px 0;
    padding: 18px 24px;
    border: 1px solid var(--sl-gold);
    border-radius: var(--sl-radius);
    background: rgba(var(--sl-gold-rgb), 0.1);
    text-align: center;
    font-size: 1.05em;
}
.sl-promo-banner p:first-child { margin-top: 0; }
.sl-promo-banner p:last-child { margin-bottom: 0; }

/* Richer variant for the homepage hero / pricing-page top banner: name,
   promo text, price and a buy button in one box (vs. the plain-text
   variant used inline on shop/index.php). */
/* Wrapper um den Banner: traegt das "Zeitlich begrenzt"-Schildchen, das
   mittig ueber die Oberkante ragt (gleiche Optik wie bei der hervorgehobenen
   Preiskarte). Muss deshalb selbst UEBERSTEHEN duerfen - das Abschneiden des
   diagonalen Eckbands passiert eine Ebene tiefer im Banner. */
.sl-promo-banner-wrap { position: relative; margin: 24px 0; }
.sl-promo-banner-wrap > .sl-promo-banner { margin: 0; }
.sl-promo-banner-wrap[data-badge]::before {
    content: attr(data-badge);
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--sl-gold);
    color: #1a1a1a;
    font-size: 0.75em;
    font-weight: 700;
    padding: 3px 12px;
    border-radius: 999px;
    z-index: 1;
}
.sl-promo-banner-hero { padding: 28px 32px; position: relative; overflow: hidden; }
.sl-promo-banner-hero h2 { margin-top: 0; margin-bottom: 8px; }
.sl-promo-banner-price { font-size: 1.6em; font-weight: 600; color: var(--sl-gold-dark, var(--sl-gold)); margin: 12px 0; }
.sl-promo-banner-hero .sl-btn { margin-top: 4px; }

/* Diagonal "gift ribbon" corner badge draped over the top-left corner. */
.sl-corner-ribbon {
    position: absolute;
    top: 20px;
    left: -42px;
    width: 150px;
    transform: rotate(-45deg);
    background: var(--sl-gold);
    color: #1a1a1a;
    text-align: center;
    font-size: 0.72em;
    font-weight: 700;
    letter-spacing: 0.08em;
    padding: 4px 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
}

/* --- Support ticket thread (simplelocale/ticket.php, shop/admin/tickets.php) --- */
.sl-ticket-thread { display: flex; flex-direction: column; gap: 14px; margin: 20px 0 28px; }
.sl-ticket-message { border-radius: var(--sl-radius); padding: 12px 16px; border: 1px solid var(--sl-border); background: var(--sl-bg); }
.sl-ticket-message-admin { background: rgba(var(--sl-gold-rgb), 0.08); border-color: var(--sl-gold); }
.sl-ticket-message-meta { font-size: 0.8em; color: var(--sl-text-muted); margin-bottom: 6px; }

/* --- Docs content --- */
.sl-docs { max-width: 760px; margin: 0 auto; }
.sl-docs h2 { text-align: left; margin-top: 40px; }
.sl-docs h3 { margin-top: 28px; }
.sl-docs p, .sl-docs li { color: var(--sl-text); }
.sl-docs-command { margin: 14px 0; }
.sl-docs-command code.sl-code { display: block; padding: 8px 12px; margin-bottom: 6px; }
.sl-docs-command p { margin: 0; color: var(--sl-text-muted); font-size: 0.92em; }
.sl-docs-figure { margin: 24px 0; text-align: center; }
.sl-docs-figure img { max-width: 100%; height: auto; border: 1px solid var(--sl-border); border-radius: var(--sl-radius); }
.sl-docs-figure figcaption { margin-top: 8px; font-size: 0.85em; color: var(--sl-text-muted); }

/* Kleinere Variante fuer Screenshots in FAQ-Antworten - dort geht es nur um
   das Wiedererkennen einer Meldung, nicht um Details im Bild. */
.sl-faq-figure { text-align: left; }
.sl-faq-figure img { max-width: 380px; }

.sl-docs-figure-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 24px; margin: 24px 0; }
.sl-docs-figure-row .sl-docs-figure { margin: 0; flex: 0 1 260px; }
.sl-docs-figure-row .sl-docs-figure img { max-width: 260px; }

/* --- Forms (support, ticket) --- */
.sl-form { max-width: 720px; margin: 0 auto; }
.sl-form label { display: block; font-weight: 600; margin-top: 16px; margin-bottom: 6px; font-size: 0.92em; }
.sl-form input, .sl-form textarea, .sl-form select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--sl-border);
    border-radius: 6px;
    font-family: inherit;
    font-size: 1em;
}
.sl-form textarea { min-height: 140px; resize: vertical; }
.sl-form button { margin-top: 20px; }

/* Gutscheincode im Checkout und auf der Upgrade-Seite.
   Bewusst klein und leise: die meisten Kaeufer haben keinen Code, und ein
   Eingabefeld in voller Formularbreite laesst sie suchen, wo denn ihrer ist.
   Deshalb eigene Masse statt der grossen .sl-form-Felder. */
.sl-voucher { margin: 4px 0 18px; max-width: 340px; }
.sl-voucher label,
.sl-form .sl-voucher label {
    display: block;
    font-weight: 400;
    font-size: 0.82em;
    color: var(--sl-text-muted);
    margin: 0 0 4px;
}
.sl-voucher-row { display: flex; gap: 6px; align-items: stretch; }
.sl-form .sl-voucher-row input[type="text"] {
    flex: 1;
    width: auto;
    padding: 5px 8px;
    font-size: 0.88em;
    border-radius: 4px;
    text-transform: uppercase;
}
/* Wie .sl-btn-secondary, nur kleiner - der Knopf steht neben einem Feld,
   das die meisten Kaeufer gar nicht ausfuellen. */
.sl-form .sl-voucher-row button {
    margin: 0;
    padding: 5px 10px;
    font-size: 0.82em;
    white-space: nowrap;
    background: transparent;
    border: 1px solid var(--sl-border);
    color: var(--sl-text-muted);
}
.sl-form .sl-voucher-row button:hover { border-color: var(--sl-gold); color: var(--sl-text); }
.sl-voucher-ok, .sl-voucher-error, .sl-voucher-hint { font-size: 0.88em; }

/* Die Auswege unter einer Gutschein-Meldung. Keiner davon ist goldgefuellt -
   der einzige gefuellte Knopf auf dieser Seite bleibt der, der Geld kostet.
   Der Umstell-Knopf traegt einen kraeftigeren Rahmen, weil er als einziger die
   Bestellung aendert; die beiden anderen fuehren nur woandershin. */
.sl-voucher-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.sl-voucher-actions .sl-btn {
    padding: 7px 12px;
    font-size: 0.85em;
    background: transparent;
    border: 1px solid var(--sl-border);
    color: var(--sl-text-muted);
}
.sl-voucher-actions .sl-btn:hover {
    border-color: var(--sl-gold);
    color: var(--sl-text);
    background: var(--sl-bg-alt);
}
.sl-voucher-actions .sl-btn-switch {
    border: 2px solid var(--sl-gold);
    color: var(--sl-text);
    font-weight: 600;
}
/* Der Umstell-Knopf hat den goldenen Rahmen schon im Ruhezustand - die
   allgemeine Hover-Regel oben aendert an ihm also nichts Sichtbares. Er
   braucht ein eigenes Zeichen: eine leichte goldene Tönung. */
.sl-voucher-actions .sl-btn-switch:hover { background: rgba(var(--sl-gold-rgb), 0.14); }

/* Wraps a message textarea with an auto-added greeting/closing (see
   support.php, ticket.php) so the whole thing reads as one message frame -
   signals to the user that they only need to write the middle part. */
.sl-message-compose { border: 1px solid var(--sl-border); border-radius: 6px; overflow: hidden; }
.sl-message-compose-preset { padding: 10px 12px; color: var(--sl-text-muted); font-style: italic; font-size: 0.95em; background: var(--sl-bg-alt); }
.sl-message-compose-greeting { border-bottom: 1px solid var(--sl-border); }
.sl-message-compose-closing { border-top: 1px solid var(--sl-border); }
.sl-message-compose textarea { width: 100%; padding: 10px 12px; border: none; border-radius: 0; font-family: inherit; font-size: 1em; display: block; margin: 0; }
.sl-message {
    background: var(--sl-bg-alt);
    border: 1px solid var(--sl-border);
    border-radius: 6px;
    padding: 14px 16px;
    margin-bottom: 20px;
}

/* --- Footer --- */
.sl-footer {
    border-top: 1px solid var(--sl-border);
    padding: 32px 0;
    color: var(--sl-text-muted);
    font-size: 0.88em;
}
.sl-footer .sl-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}
.sl-footer a { color: var(--sl-text-muted); }
.sl-footer-links a { margin-left: 16px; }
.sl-footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.sl-footer-logo {
    height: 36px;
    width: auto;
}

@media (max-width: 860px) {
    .sl-header .sl-container { height: auto; min-height: 64px; padding-top: 10px; padding-bottom: 10px; flex-wrap: wrap; }
    .sl-nav { gap: 10px; }

    /* Both panels collapse into dropdowns anchored under the nav row,
       toggled by the two buttons that only appear at this width (see
       slToggleDropdown() in simplelocale.js) - only one open at a time. */
    .sl-nav-links, .sl-flags {
        display: none;
        position: absolute;
        top: calc(100% + 8px);
        background: var(--sl-bg);
        border: 1px solid var(--sl-border);
        border-radius: var(--sl-radius);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
        padding: 8px;
        z-index: 60;
    }
    .sl-nav-links.sl-open, .sl-flags.sl-open { display: flex; }

    .sl-nav-links { left: 0; right: 0; flex-direction: column; gap: 2px; }
    .sl-nav-links a { padding: 10px 12px; border-radius: 6px; }
    .sl-nav-links a:hover, .sl-nav-links a.active { background: var(--sl-bg-alt); }

    .sl-flags { right: 0; left: auto; flex-direction: column; gap: 2px; min-width: 0; }
    .sl-flag-button { text-align: left; }

    .sl-flags-toggle, .sl-nav-toggle { display: inline-flex; align-items: center; gap: 4px; }

    /* Shop CTA collapses to an icon-only button matching the flags/menu
       toggles' size at this width - the full "Shop" text button was the
       thing forcing the whole right-hand cluster onto a second line (see
       bug report screenshot). */
    .sl-nav a.sl-nav-cta {
        padding: 5px 10px;
        border: 1px solid transparent;
        border-radius: 6px;
        font-size: 0.95em;
        display: inline-flex;
        align-items: center;
    }
    .sl-nav-cta-text { display: none; }
    .sl-nav-cta-icon { display: inline; }
}

@media (max-width: 640px) {
    .sl-hero h1 { font-size: 1.8em; }
    .sl-footer .sl-container { flex-direction: column; text-align: center; }
    .sl-footer-links a { margin: 0 8px; }
}

/* --- Admin area (German-only, no sl_translate) --- */
.sl-admin-nav {
    background: var(--sl-bg-alt);
    border-bottom: 1px solid var(--sl-border);
    padding: 14px 0;
}
.sl-admin-nav .sl-container { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 10px; }
.sl-admin-nav a { color: var(--sl-text-muted); text-decoration: none; margin-right: 18px; font-size: 0.92em; }
.sl-admin-nav a:hover, .sl-admin-nav a.active { color: var(--sl-text); }

/* Aufmerksamkeitszaehler im Admin-Menu: hochgestellt, klein, rot. Rot ist hier
   angemessen - jeder Zaehler steht fuer etwas, das jemand ansehen sollte. */
/* Befund direkt am Design in der Liste - dieselbe Farbe wie der Zaehler im
   Menu, damit erkennbar bleibt, dass es dieselbe Sache ist. */
.sl-design-problem { display: block; margin-top: 4px; color: #c0392b; font-size: 0.78em; line-height: 1.35; }

.sl-badge { display: inline-block; margin-left: 3px; padding: 1px 5px; border-radius: 8px;
            background: #c0392b; color: #fff; font-size: 0.62em; font-weight: 700;
            line-height: 1.4; vertical-align: super; }
.sl-admin-nav .sl-admin-legal { font-size: 0.85em; }
.sl-admin-legal a { margin-right: 0; margin-left: 14px; }
.sl-admin-main { padding: 32px 0 56px; }
/* Admin pages are dense/tabular - let them use more of a wide screen than
   the 1080px reading width the public pages are tuned for. */
/* Der Admin-Bereich nutzt die Bildschirmbreite - anders als die Kundenseiten,
   wo eine begrenzte Zeilenlaenge dem Lesen dient. Hier stehen Formulare und
   Tabellen nebeneinander, und links wie rechts blieb Platz ungenutzt. */
.sl-admin-main > .sl-container { max-width: min(1900px, 96vw); }

/* Zwei Felder nebeneinander (Upgrade-Ziel und -Preis, Start und Ende des
   Kaufzeitfensters) - unter 700px wieder untereinander, sonst wird jedes zu
   schmal zum Lesen. */
.sl-form-row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.sl-form-row-2 > * { margin: 0; width: 100%; }

/* Die vier Werbenamen als 2x2 statt vier Zeilen. */
.sl-form-grid-2x2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.sl-form-grid-2x2 > * { margin: 0; width: 100%; }

@media (max-width: 700px) {
    .sl-form-row-2, .sl-form-grid-2x2 { grid-template-columns: 1fr; }
}

/* Je Sprache ein Knopf, der den Werbetext in einem Dialog oeffnet. "filled"
   markiert die Sprachen, in denen etwas steht. */
.sl-lang-buttons { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 8px; }
.sl-lang-btn { padding: 7px 16px; border: 1px solid var(--sl-border); border-radius: var(--sl-radius);
               background: transparent; color: var(--sl-text-muted); cursor: pointer;
               font-size: 0.85em; letter-spacing: 0.5px; transition: all 0.2s ease; }
.sl-lang-btn:hover { border-color: var(--sl-gold); color: var(--sl-text); }
.sl-lang-btn.filled { border-color: var(--sl-gold); color: var(--sl-gold); font-weight: 600; }

/* Bildschirmfuellend, weil rohes HTML in einem drei Zeilen hohen Feld nicht
   zu ueberblicken ist. */
.sl-promo-dialog { width: min(1100px, 92vw); height: min(80vh, 900px); border: 1px solid var(--sl-border);
                   border-radius: var(--sl-radius); background: var(--sl-bg); color: var(--sl-text);
                   padding: 18px 20px; }
.sl-promo-dialog::backdrop { background: rgba(0, 0, 0, 0.55); }
.sl-promo-dialog-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.sl-promo-dialog textarea { width: 100%; height: calc(100% - 56px); resize: none;
                            font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.9em; }
.sl-admin-main h1 { font-size: 1.5em; margin-top: 0; }
.sl-admin-table { width: 100%; border-collapse: collapse; margin-top: 20px; font-size: 0.92em; }
.sl-admin-table th, .sl-admin-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--sl-border); }
.sl-admin-table th { border-bottom: 2px solid var(--sl-text); font-weight: 600; }
.sl-admin-table.sl-table-numeric th, .sl-admin-table.sl-table-numeric td { text-align: right; }
.sl-admin-table.sl-table-numeric th:first-child, .sl-admin-table.sl-table-numeric td:first-child { text-align: left; }
.sl-admin-table tfoot td { border-top: 2px solid var(--sl-text); font-weight: 700; }
.sl-status-paid { color: #1a7a3c; }
.sl-status-pending, .sl-status-open { color: #a5730a; }
.sl-status-failed, .sl-status-refunded, .sl-status-new { color: #c0392b; }
.sl-status-closed { color: var(--sl-text-muted); }
.sl-code { background: var(--sl-bg-alt); padding: 2px 5px; border-radius: 4px; font-size: 0.85em; word-break: break-all; }
.sl-hint { color: var(--sl-text-muted); font-size: 0.9em; max-width: 700px; }
/* Fuer Erlaeuterungstexte, die ueber einer breiten Tabelle stehen und deren
   Breite mitgehen sollen (shop/admin/activations.php). */
.sl-hint-wide { max-width: none; }
.sl-admin-card { border: 1px solid var(--sl-border); border-radius: var(--sl-radius); padding: 24px; max-width: 400px; margin: 80px auto; }
.sl-admin-split { display: flex; gap: 28px; align-items: flex-start; margin-top: 20px; }
.sl-admin-split-list { flex: 0 0 340px; display: flex; flex-direction: column; gap: 2px; }
.sl-admin-split-list a { display: block; padding: 8px 10px; border-radius: var(--sl-radius); text-decoration: none; color: var(--sl-text); border: 1px solid transparent; font-size: 0.9em; }
.sl-admin-split-list a:hover { background: var(--sl-bg-alt); }
.sl-admin-split-list a.active { background: rgba(var(--sl-gold-rgb), 0.12); border-color: var(--sl-gold); font-weight: 600; }
.sl-admin-split-date { display: inline-block; font-size: 0.85em; color: var(--sl-text-muted); font-weight: normal; cursor: help; }
.sl-admin-split-detail { flex: 1 1 auto; min-width: 0; max-width: 900px; }

/* Edition list rows (shop/admin/editions.php): title line with the
   right-aligned sold count, meta line with date/price/language info on
   the left and the 6 pro-feature indicator glyphs right-aligned. Both
   lines share one right edge so the numbers and glyphs stack cleanly. */
.sl-edition-row-title { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sl-edition-sold { font-size: 0.8em; color: var(--sl-text-muted); font-weight: normal; white-space: nowrap; cursor: help; }
.sl-edition-row-meta { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 1px; }
.sl-edition-meta-left { font-size: 0.8em; color: var(--sl-text-muted); font-weight: normal; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sl-info-icon { font-style: normal; cursor: help; text-decoration: underline dotted; }
.sl-edition-feature-boxes { display: flex; gap: 3px; flex-shrink: 0; }
/* Square indicator per pro feature. The spans carry a zero-width space so
   they have a text node - fully empty elements did not reliably fire
   their title tooltip. */
.sl-feature-box { display: inline-block; width: 10px; height: 10px; border: 1px solid var(--sl-text-muted); border-radius: 2px; cursor: help; font-size: 0; line-height: 0; }
.sl-feature-box.filled { background: var(--sl-gold); border-color: var(--sl-gold); }
/* Modal dialog for admin forms that would otherwise clutter a list page
   (shop/admin/licenses.php "Neue Lizenz anlegen"). Native <dialog>, so the
   backdrop, Esc-to-close and focus trapping come from the browser. */
dialog.sl-modal {
    border: 1px solid var(--sl-border);
    border-radius: var(--sl-radius);
    padding: 0;
    max-width: 720px;
    width: calc(100% - 48px);
    max-height: 85vh;
    overflow-y: auto;
    background: var(--sl-bg);
    color: var(--sl-text);
}
dialog.sl-modal::backdrop { background: rgba(0, 0, 0, 0.45); }
.sl-modal-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 18px 24px;
    border-bottom: 1px solid var(--sl-border);
    position: sticky;
    top: 0;
    background: var(--sl-bg);
}
.sl-modal-head h2 { margin: 0; font-size: 1.15em; }
.sl-modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    line-height: 1;
    padding: 0 4px;
    cursor: pointer;
    color: var(--sl-text-muted);
}
.sl-modal-close:hover { color: var(--sl-text); }
.sl-modal-body { padding: 20px 24px 24px; }
.sl-admin-page-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.sl-admin-page-head h1 { margin: 0; }

/* Such-/Filter-/Sortierleiste in den Admin-Tabellenkoepfen (siehe
   includes/admin_table.php). Bewusst durchgaengig eine Schriftgroesse fuer
   alle Bedienfelder, kleiner als der Tabelleninhalt. */
.sl-admin-table th a { text-decoration: none; color: inherit; white-space: nowrap; }
.sl-admin-table th a:hover { text-decoration: underline; }
.sl-th-control { display: flex; flex-direction: column; gap: 3px; margin-top: 6px; font-weight: normal; }
.sl-th-control input,
.sl-th-control select {
    font-size: 0.78em;
    font-family: inherit;
    padding: 3px 5px;
    border: 1px solid var(--sl-border);
    border-radius: 4px;
    background: var(--sl-bg);
    color: var(--sl-text);
    width: 100%;
    min-width: 0;
    box-sizing: border-box;
}
.sl-table-meta { font-size: 0.85em; color: var(--sl-text-muted); display: flex; align-items: center; gap: 10px; margin: 16px 0 8px; }
/* Schiebt eine Schnellauswahl in derselben Zeile an den rechten Rand. */
.sl-table-meta-right { margin-left: auto; }
.sl-table-meta-right .sl-btn { padding: 4px 10px; font-size: 0.95em; border: 1px solid var(--sl-border); background: transparent; color: var(--sl-text-muted); }
.sl-table-meta-right .sl-btn:hover { border-color: var(--sl-gold); color: var(--sl-text); }
.sl-table-meta-right .sl-btn.is-active { border-color: var(--sl-gold); color: var(--sl-text); background: rgba(212, 175, 55, 0.14); }
/* margin:0 ist wichtig - Browser geben <form> von Haus aus ein
   margin-bottom: 1em, das den Flex-Container aufblaeht und den Button
   gegenueber der Trefferzahl nach oben versetzt. */
.sl-table-apply { display: block; margin: 0; }
.sl-table-apply button {
    font-size: 0.85em;
    font-family: inherit;
    line-height: 1;
    padding: 5px 12px;
    border: 1px solid var(--sl-gold);
    border-radius: 4px;
    background: rgba(var(--sl-gold-rgb), 0.12);
    color: var(--sl-text);
    cursor: pointer;
}
.sl-table-apply button:hover { background: rgba(var(--sl-gold-rgb), 0.25); }

/* Editionsvergleich auf der Upgrade-Seite: aktuelle Edition, Pfeil,
   Ziel-Edition. Bricht auf schmalen Schirmen untereinander um, der Pfeil
   dreht sich dann mit. */
.sl-upgrade-compare {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
    justify-content: center;
    gap: 20px;
    margin-top: 36px;
}
/* Beide Karten exakt gleich breit und - durch align-items: stretch der
   Zeile - gleich hoch, auch wenn ihre Preisbloecke unterschiedlich viele
   Zeilen haben. */
.sl-upgrade-compare > .sl-price-card { flex: 0 0 320px; }
/* Preis bzw. Kaufdatum sitzen am Kartenende, damit die Merkmalslisten
   darueber zeilenweise fluchten (siehe shop/upgrade.php). */
.sl-upgrade-cardfoot { margin-top: auto; padding-top: 16px; border-top: 1px solid var(--sl-border); }
.sl-upgrade-cardfoot .sl-price-sub { margin-bottom: 0; }
/* Die Ersparnis ist die eigentliche Botschaft - sie bekommt die Groesse, die
   sonst der Preis haette, und der Verkaufspreis tritt dahinter zurueck. */
.sl-upgrade-cardfoot .sl-price { font-size: 1.15em; font-weight: 600; margin: 2px 0 0; }
.sl-upgrade-saving { font-size: 2em; font-weight: 700; line-height: 1.2; color: var(--sl-text); margin-top: 6px; }
.sl-upgrade-card-buy { margin: 14px 0 0; }
.sl-upgrade-card-buy .sl-btn { width: 100%; }
/* Zustimmung zu den Nutzungsbedingungen ueber beiden Kaufknoepfen. */
.sl-upgrade-terms { display: flex; align-items: flex-start; gap: 8px; text-align: left; font-size: 0.85em; font-weight: normal; margin: 0 0 12px; }
.sl-upgrade-terms input { width: auto; margin-top: 3px; flex: 0 0 auto; }

/* Jede Merkmalszeile reserviert zwei Textzeilen Hoehe. Ohne das verschiebt
   eine einzige umbrechende Zeile (z.B. die lange Sprachliste der Light-
   Edition gegenueber "Unbegrenzt") alle darunterliegenden Zeilen der einen
   Karte gegen die andere - und genau das Zeile-fuer-Zeile-Vergleichen ist
   der Zweck dieser Darstellung. */
/* Fester Pixelwert statt em: zwei Textzeilen samt Innenabstand ergeben rund
   61-62px, je nach Rundung des Zeilenumbruchs. Ein em-Wert landete dadurch
   mal auf 61, mal auf 62 - und dieser eine Pixel verschob bereits alle
   folgenden Zeilen der einen Karte gegen die andere. 64px liegt sicher
   darueber, also treffen alle Zeilen denselben Wert. */
.sl-upgrade-compare .sl-price-card ul li { min-height: 64px; align-items: center; }
.sl-upgrade-arrow {
    align-self: center;
    font-size: 2.2em;
    line-height: 1;
    color: var(--sl-gold);
    flex: 0 0 auto;
}
@media (max-width: 720px) {
    .sl-upgrade-compare > .sl-price-card { flex-basis: 100%; }
    .sl-upgrade-arrow { transform: rotate(90deg); }
}

.sl-suspect { background: #fdf0ef; }
.sl-upgrade-alarm { background: #fdf3e3; }

/* Umzug von Spezial-Editionen zwischen den Umgebungen
   (shop/admin/editions.php, includes/edition_transfer.php). */
.sl-transfer-box {
    border: 1px solid #e5e2da;
    border-radius: 6px;
    padding: 16px 18px;
    background: #faf9f7;
    margin-top: 28px;
}
.sl-transfer-box h3 { margin: 0 0 6px; font-size: 1.05em; }
/* Monospace, damit ein abgeschnittenes Einfuegen auffaellt, und
   umbrechend, damit der Code nicht seitlich aus dem Kasten laeuft. */
.sl-transfer-code {
    width: 100%;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.72em;
    line-height: 1.45;
    word-break: break-all;
    resize: vertical;
}

/* Bildwaehler fuer Design-Symbole (shop/admin/designs.php). Die Umrechnung
   auf 48x48 passiert im Browser, hier steht nur die Anordnung. */
.sl-icon-picker {
    display: flex;
    align-items: center;
    gap: 12px;
    max-width: 560px;
    margin: 0 auto 10px;
}
.sl-icon-picker img {
    border: 1px solid var(--sl-border);
    border-radius: 6px;
    /* Schachbrett, damit man Transparenz von Weiss unterscheiden kann. */
    background-color: #fff;
    background-image:
        linear-gradient(45deg, #e9e7e1 25%, transparent 25%, transparent 75%, #e9e7e1 75%),
        linear-gradient(45deg, #e9e7e1 25%, transparent 25%, transparent 75%, #e9e7e1 75%);
    background-size: 12px 12px;
    background-position: 0 0, 6px 6px;
    flex: 0 0 auto;
}

/* Zwei gleich breite Kachel-Aufnahmen nebeneinander (simplelocale/docs.php).
   Die Standardzeile staucht auf 260px; diese beiden sind 380px breit und
   in voller Groesse deutlich besser lesbar.
   Sie TEILEN sich den Platz (flex: 1 1 300px), statt 380px zu erzwingen: die
   Textspalte ist 712px breit, zwei feste 380er plus Abstand braeuchten 784 -
   sie waeren umgebrochen und haetten untereinander gestanden. Bis 380px
   wachsen sie mit, darueber nicht, und unter etwa 620px Fensterbreite stellt
   das flex-wrap der Elternklasse sie untereinander. */
.sl-docs-figure-row-wide .sl-docs-figure { flex: 1 1 300px; max-width: 380px; }
.sl-docs-figure-row-wide .sl-docs-figure img { max-width: 100%; }

/* Anlegen einer Dokumentfassung (shop/admin/legal.php): Notizfeld und Knopf
   in einer Zeile, damit die Notiz sichtbar zum Vorgang gehoert. */
.sl-legal-create { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.sl-legal-create input { flex: 1 1 320px; max-width: 460px; padding: 9px 12px;
    border: 1px solid var(--sl-border); border-radius: 6px; font-family: inherit; font-size: 0.95em; }
.sl-legal-create button { margin: 0; }

/* Download der geltenden Fassung unter einem Rechtstext
   (simplelocale/agb.php, withdrawal.php, license.php). Abgesetzt, weil es
   kein Teil des Textes ist, sondern ein Hinweis darauf. */
/* Wortlaut der geltenden Lizenzfassung (simplelocale/license.php). Bewusst
   praeformatiert: die LICENSE-Datei setzt ihre Absaetze selbst, ein Umbruch
   durch den Browser wuerde ihre Gliederung zerstoeren. Auf schmalen Schirmen
   scrollt der Block fuer sich, statt die Seite breit zu ziehen. */
/* Verweis auf die Vergleichstabelle weiter unten. */
.sl-matrix-jump { text-align: center; margin: 22px 0 0; }
.sl-matrix-jump a { color: var(--sl-gold); text-decoration: none; font-size: 0.95em; }
.sl-matrix-jump a:hover { text-decoration: underline; }

.sl-legal-fulltext { margin: 12px 0 0; padding: 18px 20px; overflow-x: auto;
                     border: 1px solid var(--sl-border); border-radius: var(--sl-radius);
                     background: rgba(0, 0, 0, 0.02); font-family: inherit;
                     font-size: 0.92em; line-height: 1.6; white-space: pre-wrap;
                     overflow-wrap: anywhere; }

.sl-legal-download { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--sl-border); font-size: 0.9em; }

/* Wortlaut einer archivierten Nachricht (shop/admin/emails.php). Im iframe,
   weil das E-Mail-HTML eigene Stile mitbringt, die sonst in die Admin-Seite
   hineinwirken wuerden. */
.sl-mail-preview { width: 100%; height: 620px; border: 1px solid var(--sl-border);
                   border-radius: var(--sl-radius); background: #fff; }
