/* ============================================
   LA MIDNIGHT – WIKI ARTICLES
   Styling für den Fließtext innerhalb von
   Wiki-Artikeln (.rpgwiki-article-body).
   Alle Variablen kommen aus 00-settings.css.
   ============================================ */


/* === ARTICLE BODY ===
   Container für den gesamten Artikelinhalt */
.rpgwiki-article-body {
    color: var(--text);                  /* #e5e5e5 */
    font-family: var(--font-body);       /* Inter */
    font-size: 0.925rem;
    line-height: 1.8;
}


/* -----------------------------------------------
   ÜBERSCHRIFTEN
   H1 wird im Header gerendert (rpg_wiki.css),
   H2–H4 sind Gliederungsebenen im Artikeltext.
----------------------------------------------- */

/* H2 – Hauptabschnitt.
   Bebas Neue mit rotem Akzent-Strich darunter */
.rpgwiki-article-body h2 {
    font-family: var(--font-display);    /* Bebas Neue */
    font-size: 1.7rem;
    letter-spacing: 0.05em;
    color: var(--text);
    margin: var(--space-xl) 0 var(--space-sm) 0;  /* 32px oben, 8px unten */
    padding-bottom: var(--space-xs);
    border-bottom: 1px solid var(--border);
    position: relative;
}

/* Roter Kurzstrich unter H2 als typografischer Akzent */
.rpgwiki-article-body h2::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 40px;
    height: 1px;
    background: var(--accent);           /* #ff4422 */
}

/* H3 – Unterabschnitt */
.rpgwiki-article-body h3 {
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-muted);            /* #888 */
    margin: var(--space-lg) 0 var(--space-xs) 0;  /* 24px oben, 4px unten */
}

/* H4 – Kleinste Gliederung */
.rpgwiki-article-body h4 {
    font-family: var(--font-mono);       /* Space Mono */
    font-size: 0.75rem;
    color: var(--text-dim);              /* #555 */
    margin: var(--space-md) 0 var(--space-xs) 0;  /* 16px oben, 4px unten */
    text-transform: uppercase;
    letter-spacing: 0.08em;
}


/* -----------------------------------------------
   FLIESSTEXT
----------------------------------------------- */

.rpgwiki-article-body p {
    margin: 0 0 var(--space-md) 0;      /* 16px statt 24px */
}

/* Erstes <p> nach einer Überschrift: kein extra Margin oben */
.rpgwiki-article-body h2 + p,
.rpgwiki-article-body h3 + p,
.rpgwiki-article-body h4 + p {
    margin-top: 0;
}

/* Fett */
.rpgwiki-article-body strong {
    color: var(--text);
    font-weight: 600;
}

/* Kursiv – etwas heller für Eigennamen / Zitate inline */
.rpgwiki-article-body em {
    color: var(--text-muted);
    font-style: italic;
}

/* Horizontale Linie – nur als Haupt-Trenner, bewusst sparsam einsetzen */
.rpgwiki-article-body hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: var(--space-lg) 0;           /* 24px statt 48px */
}


/* -----------------------------------------------
   LINKS
----------------------------------------------- */

.rpgwiki-article-body a {
    color: var(--text);
    text-decoration: underline;
    text-decoration-color: var(--border-light);
    text-underline-offset: 3px;
    transition: var(--transition);
}

.rpgwiki-article-body a:hover {
    color: var(--accent);                /* #ff4422 */
    text-decoration-color: var(--accent);
}


/* -----------------------------------------------
   LISTEN
----------------------------------------------- */

.rpgwiki-article-body ul,
.rpgwiki-article-body ol {
    margin: 0 0 var(--space-lg) var(--space-lg);
    padding: 0;
}

.rpgwiki-article-body li {
    margin-bottom: var(--space-sm);
    line-height: 1.7;
}

/* Custom Bullet: kleiner roter Strich statt Kreis */
.rpgwiki-article-body ul {
    list-style: none;
    margin-left: 0;
    padding-left: var(--space-lg);
}

.rpgwiki-article-body ul li {
    position: relative;
    padding-left: var(--space-md);
}

.rpgwiki-article-body ul li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--accent);                /* roter Gedankenstrich */
    font-size: 0.8em;
    top: 0.15em;
}

/* Nummerierte Listen bleiben Standard */
.rpgwiki-article-body ol {
    list-style: decimal;
    padding-left: var(--space-lg);
}

.rpgwiki-article-body ol li::marker {
    color: var(--accent);
    font-family: var(--font-mono);
    font-size: 0.8em;
}


/* -----------------------------------------------
   BLOCKQUOTE
   Zitate und atmosphärische Einschübe
----------------------------------------------- */

.rpgwiki-article-body blockquote {
    margin: var(--space-xl) 0;
    padding: var(--space-lg) var(--space-xl);
    background: var(--bg-alt);           /* #0a0a0a */
    border-left: 3px solid var(--accent);
    position: relative;
}

/* Anführungszeichen-Deko oben links */
.rpgwiki-article-body blockquote::before {
    content: '"';
    position: absolute;
    top: -0.1em;
    left: var(--space-md);
    font-family: var(--font-display);
    font-size: 4rem;
    color: var(--accent);
    opacity: 0.15;
    line-height: 1;
    pointer-events: none;
}

.rpgwiki-article-body blockquote p {
    margin: 0 0 var(--space-sm) 0;
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* Letzter Absatz (Quellenangabe) */
.rpgwiki-article-body blockquote p:last-child {
    margin: 0;
    font-style: normal;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    letter-spacing: 0.06em;
    color: var(--text-dim);
}


/* -----------------------------------------------
   WIKI-INTRO
   Flex-Layout für Einleitungstext + Infobox.
   Flex ist robuster als Grid in Containern mit
   overflow-y oder übergeordnetem Flex-Context.

   Verwendung im HTML:
   <div class="wiki-intro">
     <div class="wiki-intro-text">  ← Fließtext links
     <div class="wiki-infobox">     ← Steckbrief rechts
   </div>
----------------------------------------------- */

.wiki-intro {
    display: flex;
    gap: var(--space-lg);               /* 24px Abstand zwischen Text und Box */
    align-items: flex-start;
    margin-bottom: var(--space-lg);
    width: 100%;
}

/* Linke Spalte: wächst und füllt restlichen Platz */
.wiki-intro-text {
    flex: 1 1 0;
    min-width: 0;                        /* verhindert Overflow bei langem Text */
}

.wiki-intro-text p:first-child {
    margin-top: 0;
}


/* -----------------------------------------------
   INFOBOX
   Steckbrief-Box – lebt jetzt immer innerhalb
   von .wiki-intro, kein Float mehr.
----------------------------------------------- */

.wiki-infobox {
    flex-shrink: 0;                      /* Breite bleibt fix, schrumpft nicht */
    width: 300px;
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-top: 2px solid var(--accent); /* roter Akzentbalken oben */
    font-size: 0.78rem;
}

/* Infobox-Titel */
.wiki-infobox-title {
    font-family: var(--font-display);
    font-size: 0.9rem;
    letter-spacing: 0.06em;
    color: var(--text);
    padding: var(--space-sm) var(--space-md);
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    text-transform: uppercase;
}

/* Tabelle mit den Fakten-Zeilen */
.wiki-infobox table {
    width: 100%;
    border-collapse: collapse;
}

.wiki-infobox td {
    padding: var(--space-xs) var(--space-md);
    border-bottom: 1px solid var(--border);
    vertical-align: top;
    line-height: 1.5;
}

/* Linke Spalte: Label in Mono/Caps */
.wiki-infobox td:first-child {
    color: var(--text-dim);
    font-family: var(--font-mono);
    font-size: 0.62rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    white-space: nowrap;
    padding-right: var(--space-sm);
    width: 42%;
}

/* Rechte Spalte: Wert */
.wiki-infobox td:last-child {
    color: var(--text-muted);
}

/* Schmale Screens: Grid bricht auf eine Spalte,
   Infobox erscheint über dem Text */
@media (max-width: 700px) {
    .wiki-intro {
        grid-template-columns: 1fr;
    }

    /* Infobox vor dem Text-Div zeigen (DOM-Reihenfolge bleibt) */
    .wiki-infobox {
        order: -1;
        width: 100%;
    }
}


/* -----------------------------------------------
   QUELLEN-SECTION
   Gesonderte Quellenhinweise am Artikelende –
   für die Credits-Seite und Quellenangaben
----------------------------------------------- */

/* Überschrift "Quellen & Referenzen" */
.wiki-sources {
    margin-top: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border);
}

.wiki-sources h2 {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-dim);
    margin: 0 0 var(--space-lg) 0;
    /* Kein Akzent-Strich hier – das ist Footer-Bereich */
    border: none;
    padding: 0;
}

.wiki-sources h2::after {
    display: none;
}

/* Quelleneinträge */
.wiki-sources ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.wiki-sources ul li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border);
    font-size: 0.78rem;
    color: var(--text-dim);
    padding-left: 0;
}

.wiki-sources ul li::before {
    display: none;                       /* kein roter Strich in Quellen */
}

.wiki-sources ul li a {
    color: var(--text-muted);
}

.wiki-sources ul li a:hover {
    color: var(--accent);
}


/* -----------------------------------------------
   HINWEIS-BOX (Fiktionalisierungshinweis o.ä.)
   .wiki-notice für neutrale Info-Kästen
----------------------------------------------- */

.wiki-notice {
    padding: var(--space-md) var(--space-lg);
    background: var(--bg-alt);
    border: 1px solid var(--border);
    border-left: 3px solid var(--text-dim);
    margin: var(--space-xl) 0;
    font-size: 0.8rem;
    color: var(--text-dim);
    font-family: var(--font-mono);
    line-height: 1.65;
}

.wiki-notice strong {
    color: var(--text-muted);
}

/* Variante: Warnung / wichtiger Hinweis */
.wiki-notice.wiki-notice--warning {
    border-left-color: var(--warning);   /* #fbbf24 */
    background: var(--warning-bg);
    color: var(--warning);
}

/* Variante: Lore-gesperrter Inhalt */
.wiki-notice.wiki-notice--restricted {
    border-left-color: var(--accent);
    background: var(--accent-dim);
    color: var(--text-muted);
}