/* =============================================================================
   TemplateData Styling
   ---------------------------------------------------------------------------
   Ziel:
   • Stabiles Layout (kein Überlaufen, keine sprengenden Tabellen)
   • Saubere Darstellung von Parametern, Beispielen und Typen
   • Darkmode-kompatibel via CSS-Variablen
   ============================================================================= */


/* ==========================================================================
   1) Haupt-Wrapper um das gesamte TemplateData-Element
   --------------------------------------------------------------------------
   Dieser Block bildet die Umrandung.
   ============================================================================= */
.vorlage-templatedate {      /* Tippfehler ist legacy ? */
    border: 1px solid var(--color-doku-dark);
    width: 95%;
    padding: .5rem;
    margin: 1.5em auto;
    border-radius: .4rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}


/* ==========================================================================
   2) Kopfzeile (kleine Überschrift: TemplateData)
   --------------------------------------------------------------------------
   Leicht abgesetzt, schmaler Abstand, kein WP-Lavendel.
   ============================================================================= */
.vorlage-templatedata-headline {
    background-color: var(--bg-doku);
    padding: 0.45em 0.75em;
    border-radius: 1.35em;
    font-size: 0.85em;
    font-weight: bold;
    position: relative;
    top: -1.9em;
    left: 65em;
    width: max-content;
    border: 1px solid var(--color-doku-dark);
    box-shadow: 0 1px 3px rgba(0,0,0,0.12);
}

.vorlage-templatedata-headline a {
    text-decoration: none;
    font-weight: bold;
}

.vorlage-templatedata-headline a:hover {
    text-decoration: underline;
}

.vorlage-templatedata-headline small {
	font-size:1em;
}

.vorlage-templatedata-headline small::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    content: "\f121""";
    margin-right: .35em;
    opacity: 0.7;
    font-size: .9em;
    vertical-align: baseline;
}

.mw-templatedata-doc-wrap h2 {
    border-bottom: none;
    margin-left: -.7em;
}


/* ==========================================================================
   3) Inhaltlicher Kasten
   --------------------------------------------------------------------------
   Das entspricht dem Hauptbereich.
   Bei uns neutraler & Barrierefrei.
   ============================================================================= */
.mw-templatedata-doc-wrap {
    padding: 1.25em;
    color: var(--color-text);
    max-width: 100%;
    overflow-x: auto;  /* verhindert „ausbrechende" Tabellen */
}


/* ==========================================================================
   4) Tabellen-Styling (Hauptparameter-Tabelle)
   --------------------------------------------------------------------------
   Wichtig: table-layout: fixed verhindert Überlauf,
            width: 100% sorgt für stabile Breite.
   ============================================================================= */
.mw-templatedata-doc-wrap table {
    width: 100% !important;
    table-layout: fixed;
    border-collapse: collapse;
    font-size: 0.95em;
}

.mw-templatedata-doc-wrap th {
    background: var(--color-doku);
    padding: 0.6em;
    border: 1px solid var(--color-doku-dark);
    text-align: left;
    font-weight: bold;
}

.mw-templatedata-doc-wrap td {
    padding: 0.55em;
    border: 1px solid var(--bg-neutral-dark);
    vertical-align: top;
    word-break: break-word;
    white-space: normal;
}


/* ==========================================================================
   5) Zeilenhintergründe ohne Inline-Störfarben
   --------------------------------------------------------------------------

   ============================================================================= */
.mw-templatedata-doc-wrap tbody tr:nth-child(odd) {
    background: var(--bg-neutral-light);
}

.mw-templatedata-doc-wrap tbody tr:nth-child(even) {
    background: var(--bg-neutral);
}


/* ==========================================================================
   6) Status (erforderlich / optional / vorgeschlagen)
   --------------------------------------------------------------------------
   
   ============================================================================= */
.mw-templatedata-doc-param-status-required {
    font-weight: bold;
    color: var(--color-error-dark);
}

.mw-templatedata-doc-param-status-optional {
    color: var(--color-text);
    opacity: 0.8;
}

.mw-templatedata-doc-param-status-suggested {
    color: var(--color-info-dark);
    font-style: italic;
}


/* ==========================================================================
   7) <code>-Elemente (die Parameternamen)
   --------------------------------------------------------------------------
   Entfernt den standardmäßig hässlichen Skin-Hintergrund.
   ============================================================================= */
.mw-templatedata-doc-param-name code {
    background:var(--background-color-interactive);
    border: 1px solid var(--bg-neutral-dark);
    padding: 0.1em 0.35em;
    border-radius: 0.2em;
    font-size: 0.88em;
    font-family: monospace;
}

.mw-templatedata-doc-param-alias {
    color: #555;
    padding: 0.1em 0.35em;
    font-style: italic;
}

/* Beispiele im Beschreibungstext */
.mw-templatedata-doc-wrap code {
    border: 1px solid var(--bg-neutral-dark);
    padding: 0.1em 0.3em;
    border-radius: 0.2em;
}


/* ==========================================================================
   8) Listen und Unterpunkte (z.B. „Vorgeschlagene Werte“)
   ============================================================================= */
.mw-templatedata-doc-wrap ul {
    margin: 0.3em 0 0.6em 1.2em;
}