/*
 * wp-ttpa: öffentliche Seiten.
 *
 * Schriftart und Textfarbe kommen aus dem Theme. Größen, Abstände und Gewichte legt das Plugin selbst fest,
 * damit die Seite auch dann ordentlich aussieht, wenn das Theme keine sauberen globalen Überschriften hat
 * (z. B. Divi-Seiten, deren Typografie nur in Modulen steckt).
 *
 * Stellschrauben (Stammdaten → Darstellung oder eigenes CSS im Theme):
 *   --ttpa-accent        Akzentfarbe (Nummern, Linien, Knöpfe); ohne Angabe: Textfarbe, Knöpfe nur umrandet
 *   --ttpa-accent-text   Schriftfarbe auf Knöpfen mit Akzentfarbe (wird passend zum Kontrast gesetzt)
 *   --ttpa-width         Inhaltsbreite
 * Die Schrift der Überschriften ist standardmäßig die des Themes; die Option „wie Fließtext“ ergänzt
 * .ttpa :is(h1, h2, h3) { font-family: inherit; }
 */
.ttpa {
	--ttpa-width: 860px;
	--ttpa-line: rgba(127, 127, 127, .3);
	max-width: var(--ttpa-width);
	margin: 2em auto 3em;
	line-height: 1.55;
	overflow-wrap: break-word;
}
.ttpa-in-content .ttpa { margin-top: 0; margin-bottom: 0; }

.ttpa h1, .ttpa h2, .ttpa h3 {
	font-weight: 700;
	line-height: 1.25;
	padding: 0;
	overflow-wrap: anywhere;
	hyphens: auto;
}
.ttpa h1 { font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.6rem); margin: 0 0 .35em; }
.ttpa h2 { font-size: 1.25em; margin: 1.6em 0 .4em; }
.ttpa h3 { font-size: 1em; margin: 0 0 .25em; line-height: 1.4; font-weight: 600; }
.ttpa p { margin: 0 0 1em; padding: 0; }

.ttpa .ttpa-lead { margin-bottom: 1.5em; }
.ttpa .ttpa-lead small, .ttpa .ttpa-hint { opacity: .75; font-size: .9em; }
.ttpa .ttpa-back { font-size: .9em; margin-bottom: 1em; }

.ttpa .ttpa-points { list-style: none; margin: 0 0 1.5em; padding: 0; }
.ttpa .ttpa-point { display: grid; grid-template-columns: 2.4em 1fr; column-gap: .6em; padding: .9em 0; margin: 0; border-top: 1px solid var(--ttpa-line); }
.ttpa .ttpa-point::before { content: attr(value) "."; font-weight: 700; grid-row: span 2; color: var(--ttpa-accent, currentColor); }
.ttpa .ttpa-value { overflow-wrap: anywhere; }
.ttpa .ttpa-section { padding-bottom: .3em; border-bottom: 2px solid var(--ttpa-accent, currentColor); }
.ttpa .ttpa-sub { margin: 0; }
.ttpa .ttpa-sub dt { font-weight: 600; margin-top: .5em; }
.ttpa .ttpa-sub dd { margin: 0 0 0 1.2em; }

.ttpa .ttpa-note { margin: 0 0 1.5em; }
.ttpa .ttpa-test { border-left: 4px solid #996800; background: rgba(219, 166, 23, .14); padding: .8em 1em; margin: 0 0 1.5em; }
.ttpa .ttpa-withdrawn, .ttpa .ttpa-error { border-left: 4px solid #b32d2e; background: rgba(179, 45, 46, .07); padding: .8em 1em; margin: 0 0 1.5em; }
.ttpa .ttpa-error ul { margin: 0; padding-left: 1.2em; }
.ttpa .ttpa-success { border-left: 4px solid #00701a; background: rgba(0, 112, 26, .07); padding: .8em 1em; }
.ttpa .ttpa-badge { display: inline-block; font-size: .75em; padding: .05em .55em; border-radius: 1em; background: rgba(179, 45, 46, .12); color: #8a2424; }

.ttpa .ttpa-table-wrap { overflow-x: auto; }
.ttpa .ttpa-table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; border: 0; }
.ttpa .ttpa-table th, .ttpa .ttpa-table td { text-align: left; padding: .55em .6em; border: 0; border-bottom: 1px solid var(--ttpa-line); vertical-align: top; }
.ttpa .ttpa-table th { border-bottom: 2px solid var(--ttpa-accent, currentColor); font-weight: 600; }
.ttpa .ttpa-table td:first-child { white-space: nowrap; font-weight: 600; }

.ttpa .ttpa-form label { font-weight: 600; }
.ttpa .ttpa-form label small { font-weight: 400; opacity: .75; }
.ttpa .ttpa-form input[type="text"], .ttpa .ttpa-form input[type="email"], .ttpa .ttpa-form textarea {
	width: 100%; max-width: 560px; box-sizing: border-box; margin-top: .3em;
	padding: .5em .6em; font: inherit; color: inherit; background: transparent;
	border: 1px solid var(--ttpa-line); border-radius: 3px;
}
.ttpa .ttpa-form.ttpa-lookup-form input[type="text"] { max-width: 220px; }
.ttpa .ttpa-form button {
	font: inherit; font-weight: 600; cursor: pointer; padding: .5em 1.1em; margin-top: .3em;
	color: var(--ttpa-accent-text, inherit); background: var(--ttpa-accent, transparent); border: 1px solid var(--ttpa-accent, currentColor); border-radius: 3px;
}
.ttpa .ttpa-form button:hover, .ttpa .ttpa-form button:focus { opacity: .85; }
.ttpa .ttpa-hp { position: absolute !important; left: -9999px !important; height: 1px; overflow: hidden; }

@media print {
	.ttpa { max-width: none; }
	.ttpa .ttpa-back, .ttpa .ttpa-hint, .ttpa form { display: none; }
	.ttpa .ttpa-point { break-inside: avoid; }
}

/* Eigene Vorlage hat keine Seitenleiste: Trennlinie klassischer Themes (z. B. Divi) ausblenden. */
body.ttpa-page #main-content .ttpa-container::before { display: none; }
