/* ============================================================
   hilfe.css — Optik der AddOn-Handbücher
   Ablage:      templates/crmmanufaktur/css/hilfe.css
   Einbindung:  index.php, gegated auf Seitenklasse "hilfe"
   Geltung:     alles unter .hilfe-doc — greift nirgendwo sonst
   Wiederverwendbar für jedes weitere Handbuch, solange die
   Entwickler-HTML der Übergabe-Spezifikation folgt.
   ============================================================ */

/* ---- Regler: alles Einstellbare an einer Stelle -------------
   Die var(--color-…)-Werte sind die Template-Tokens.
   Der zweite Wert ist nur Fallback, falls ein Token anders heißt. */


#hilfe {          /* vorher: .hilfe-doc */
    --hilfe-akzent:      var(--color-accent, #1f7a8c);
  
    --hilfe-akzent:      var(--color-accent, #1f7a8c);
    --hilfe-text:        var(--color-text, #333);
    --hilfe-text-leise:  var(--color-text-muted, #6b7280);
    --hilfe-flaeche:     var(--color-bg-surface, #fff);
    --hilfe-grund:       var(--color-bg-alt, #f5f6fa);
    --hilfe-linie:       #dde0e6;

    --hilfe-nav-breite:  260px;
    --hilfe-nav-top:     90px;   /* Höhe des Site-Headers + Luft */
    --hilfe-radius:      8px;
}


#hilfe .content-categoryhilfe {
    min-height: 55vh;
    padding-block: var(--space-24) var(--space-20);
}

@media (max-width: 1920px) {
    #hilfe .content-categoryhilfe {
        padding-block: var(--space-16) var(--space-12);
    }
}

/* ---- Grundraster: Navigation links, Inhalt rechts ---------- */
.hilfe-doc {
    display: grid;
    grid-template-columns: var(--hilfe-nav-breite) minmax(0, 1fr);
    gap: 32px;
    align-items: start;
    color: var(--hilfe-text);
}


/* ---- Seitenrahmen (liegt außerhalb .hilfe-doc) ---------------
   Der Beitragstitel kommt aus dem Joomla-Artikel-Layout und
   bringt auf der Standard-Route keine eigenen Abstände mit. */
#hilfe .com-content-article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: var(--space-8);
    align-items: center;
    padding-block: var(--space-10) var(--space-12);
}



/* Standard: alles volle Breite, eigene Zeile */
#hilfe .com-content-article > * { grid-column: 1 / -1; }

#hilfe .page-header {
    grid-column: 1;
    margin-bottom: 0;
}

#hilfe .item-image {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
}

#hilfe .item-image img {
    display: block;
    width: clamp(90px, 10vw, 140px);
    height: auto;
}



/* ---- Navigation ------------------------------------------- */
.hilfe-nav {
    position: sticky;
    top: var(--hilfe-nav-top);
    max-height: calc(100vh - var(--hilfe-nav-top) - 24px);
    overflow-y: auto;
    background: var(--hilfe-grund);
    border: 1px solid var(--hilfe-linie);
    border-radius: var(--hilfe-radius);
    padding: 8px 0 12px;
}

.hilfe-nav__titel {
    margin: 0;
    padding: 10px 18px 6px;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--hilfe-akzent);
}

.hilfe-nav__label {
    margin: 0;
    padding: 14px 18px 4px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--hilfe-text-leise);
}

.hilfe-nav a {
    display: block;
    padding: 6px 16px 6px 18px;
    border-left: 3px solid transparent;
    font-size: 0.88rem;
    line-height: 1.35;
    color: var(--hilfe-text);
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s;
}

.hilfe-nav a:hover,
.hilfe-nav a:focus-visible {
    background: var(--hilfe-flaeche);
    border-left-color: var(--hilfe-akzent);
    color: var(--hilfe-akzent);
}

.hilfe-nav__sub {
    padding-left: 34px !important;
    font-size: 0.82rem;
    color: var(--hilfe-text-leise) !important;
}

/* Angeklickter Abschnitt bleibt markiert — ohne JavaScript */
.hilfe-content section:target {
    box-shadow: 0 0 0 2px var(--hilfe-akzent);
}

/* ---- Inhaltsblöcke ----------------------------------------- */
.hilfe-content section {
    background: var(--hilfe-flaeche);
    border: 1px solid var(--hilfe-linie);
    border-radius: var(--hilfe-radius);
    padding: 28px 32px;
    margin-bottom: 24px;
    scroll-margin-top: var(--hilfe-nav-top);
}

.hilfe-content h2 {
    margin: 0 0 18px;
    padding-left: 14px;
    border-left: 4px solid var(--hilfe-akzent);
    font-size: 1.4rem;
    line-height: 1.25;
}

.hilfe-content h3 {
    margin: 26px 0 10px;
    font-size: 1.1rem;
    scroll-margin-top: var(--hilfe-nav-top);
}

.hilfe-content h4 {
    margin: 20px 0 8px;
    font-size: 0.98rem;
    color: var(--hilfe-text-leise);
    scroll-margin-top: var(--hilfe-nav-top);
}

.hilfe-content p { margin: 0 0 14px; }
.hilfe-content ul,
.hilfe-content ol { margin: 10px 0 16px 22px; }
.hilfe-content li { margin-bottom: 6px; }

/* ---- Screenshots ------------------------------------------- */
.hilfe-screenshot {
    display: block;
    max-width: 100%;
    height: auto;
    margin: 16px 0;
    border: 1px solid var(--hilfe-linie);
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

/* ---- Hinweisboxen ------------------------------------------ */
.hilfe-tipp,
.hilfe-warnung,
.hilfe-info {
    position: relative;
    margin: 18px 0;
    padding: 14px 18px 14px 48px;
    border: 1px solid;
    border-radius: 6px;
    font-size: 0.93rem;
}

.hilfe-tipp::before,
.hilfe-warnung::before,
.hilfe-info::before {
    position: absolute;
    left: 16px;
    top: 13px;
    font-size: 1.2rem;
    line-height: 1;
}

.hilfe-tipp {
    background: #eaf4fd;
    border-color: #bdd8f1;
    color: #2a5f8f;
}
.hilfe-tipp::before { content: "\1F4A1"; }

.hilfe-warnung {
    background: #fef3e2;
    border-color: #f0d4a0;
    color: #8a6914;
}
.hilfe-warnung::before { content: "\26A0\FE0F"; }

.hilfe-info {
    background: var(--hilfe-grund);
    border-color: var(--hilfe-linie);
    color: var(--hilfe-text);
}
.hilfe-info::before { content: "\2139\FE0F"; }

.hilfe-tipp p:last-child,
.hilfe-warnung p:last-child,
.hilfe-info p:last-child { margin-bottom: 0; }

/* ---- Referenztabellen -------------------------------------- */
.hilfe-ref {
    width: 100%;
    margin: 14px 0;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.hilfe-ref th {
    padding: 8px 12px;
    background: var(--hilfe-grund);
    border-bottom: 2px solid var(--hilfe-linie);
    text-align: left;
}

.hilfe-ref td {
    padding: 6px 12px;
    border-bottom: 1px solid var(--hilfe-linie);
    vertical-align: top;
}

.hilfe-ref tr:hover td { background: var(--hilfe-grund); }

/* ---- Kleinteile -------------------------------------------- */
.hilfe-doc kbd {
    display: inline-block;
    padding: 2px 7px;
    background: var(--hilfe-grund);
    border: 1px solid var(--hilfe-linie);
    border-radius: 4px;
    box-shadow: 0 1px 0 #bbb;
    font-family: inherit;
    font-size: 0.85rem;
}

.hilfe-farbe--gruen { color: #27ae60; }
.hilfe-farbe--rot   { color: #e74c3c; }
.hilfe-farbe--blau  { color: #2f80c4; }

/* ---- Mobil: Navigation als scrollbarer Kasten oben --------- */
@media (max-width: 900px) {
    .hilfe-doc {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .hilfe-nav {
        position: static;
        max-height: 40vh;
    }

    .hilfe-content section {
        padding: 20px 18px;
    }

    #hilfe .com-content-article { grid-template-columns: 1fr; }
    #hilfe .item-image { grid-column: 1; grid-row: auto; }
}

/* ---- Druck: Handbuch als PDF ------------------------------- */
@media print {
    .hilfe-nav { display: none; }

    .hilfe-doc { display: block; }

    .hilfe-content section {
        border: none;
        padding: 12px 0;
        margin-bottom: 12px;
        page-break-inside: avoid;
    }

    .hilfe-content h2 { page-break-after: avoid; }

    .hilfe-screenshot { box-shadow: none; }
}



/* ---- Übersicht der Handbücher ------------------------------ */
#hilfe .com-content-category h1 { margin-bottom: var(--space-8); }

#hilfe .com-content-category__pagination { display: none; }

#hilfe .com-content-category__table {
    --bs-table-bg: transparent;
    --bs-table-striped-bg: transparent;
    border: 0;
}

#hilfe .com-content-category__table,
#hilfe .com-content-category__table tbody,
#hilfe .com-content-category__table tr,
#hilfe .com-content-category__table .list-title {
    display: block;
}

#hilfe .com-content-category__table thead { display: none; }

#hilfe .com-content-category__table tr {
    margin-bottom: 12px;
    background: var(--hilfe-flaeche);
    border: 1px solid var(--hilfe-linie);
    border-radius: var(--hilfe-radius);
}

#hilfe .com-content-category__table .list-title {
    padding: 0;
    border: 0;
    font-weight: 400;
}

#hilfe .com-content-category__table .list-title a {
    display: block;
    padding: 18px 22px;
    font-size: 1.15rem;
    color: var(--hilfe-text);
    text-decoration: none;
}

#hilfe .com-content-category__table tr:hover {
    border-color: var(--hilfe-akzent);
}

#hilfe .com-content-category__table tr:hover .list-title a {
    color: var(--hilfe-akzent);
}