/*
 * Handbuch-Einträge (post_type docs): Typografie des Inhalts und Darstellung
 * für Funktionen aus dem Plugin „tomedo Support“. Wird nur auf
 * Handbuch-Einträgen geladen.
 */

/* ---------------------------------------------------------------------------
 * Feedback „War diese Seite hilfreich?“ – Formular nach „Nein“
 * Markup: tomedo-support/includes/class-feedback.php
 * ------------------------------------------------------------------------ */

.tomedo-feedback-form {
	clear: both;
	width: 100%;
	margin-top: 1em;
	padding: 1em;
	background: #f5f5f5;
	border-radius: var(--tomedo-radius, 3px);
	box-shadow: 0 2px 4px rgb(0 0 0 / 5%);
}

.tomedo-feedback-form[hidden] {
	display: none;
}

.tomedo-feedback-form .frm_forms {
	margin: 0;
}

/* Formidable-Abstände unter dem letzten Feld entfernen (Box hat eigenes Padding). */
.tomedo-feedback-form .with_frm_style {
	--fieldset-padding: 0;
}

.tomedo-feedback-form .frm_form_field:has(> .frm_submit) {
	margin-bottom: 0;
}

.tomedo-feedback-form textarea {
	width: 100%;
}

.tomedo-feedback-form .frm_submit {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	align-items: center;
}

/* „Abbrechen“ bringt Inline-Styles aus Formidable mit; Abstand über gap. */
.tomedo-feedback-form #cancel-negative-feedback {
	margin-left: 0 !important;
}

.tomedo-feedback-dialog {
	/* em statt rem: Bricks setzt html { font-size: 62.5% }. */
	max-width: min(400px, calc(100vw - 2em));
	padding: 1.25em;
	font-size: 16px;
	text-align: center;
	background: #fff;
	border: 0;
	border-radius: var(--tomedo-radius, 3px);
	box-shadow: 0 4px 6px rgb(0 0 0 / 10%);
}

.tomedo-feedback-dialog::backdrop {
	background: rgb(0 0 0 / 50%);
}

.tomedo-feedback-dialog__title {
	margin: 0 0 0.5em;
	font-size: 1.125em;
	font-weight: 600;
	color: #1e7b34;
}

.tomedo-feedback-dialog__text {
	margin: 0 0 1.25em;
	color: #555;
}

.tomedo-feedback-dialog__close {
	padding: 0.5em 1em;
	font-size: 0.875em;
	color: #fff;
	cursor: pointer;
	background: #1e7b34;
	border: 0;
	border-radius: var(--tomedo-radius, 3px);
}

.tomedo-feedback-dialog__close:focus-visible {
	outline: 2px solid #1e7b34;
	outline-offset: 2px;
}

/* ---------------------------------------------------------------------------
 * Typografie des Inhalts (Lesbarkeit)
 *
 * EazyDocs setzt seine Regeln mit .single-docs #post …, teils mit !important;
 * die Selektoren hier tragen daher dieselbe ID. Größen in em, damit die
 * Schriftgrößen-Knöpfe (A-/A+, setzen Inline-Styles in px) weiter wirken.
 * ------------------------------------------------------------------------ */

/* Grundschrift 16 statt 15 px; Überschriften wachsen über ihre em-Werte mit. */
.single-docs #post .doc-scrollable {
	font-size: 1.6rem;
}

/* Absätze und Listen mit gleichem Zeilenabstand (vorher 1,9 bzw. 1,6). */
.single-docs #post .doc-scrollable p,
.single-docs #post .doc-scrollable li {
	line-height: 1.7;
	text-wrap: pretty;
}

/* Listen: Abstand wie nach einem Absatz (Luft zwischen den Punkten: gap 10px aus EazyDocs). */
.single-docs #post .doc-scrollable :is(ul, ol):is(.wp-block-list, :not([class])) {
	margin: 0 0 1.2em;
	padding-bottom: 0;
}

.single-docs #post .doc-scrollable li > p:last-child {
	margin-bottom: 0;
}

.single-docs #post .doc-scrollable li > :is(ul, ol) {
	margin-top: 0.4em;
	margin-bottom: 0;
}

/* Überschriften: deutlicher Abstand zum vorigen Abschnitt, enger zum eigenen Text. */
.single-docs #post .doc-scrollable :is(h2, h3, h4) {
	margin-top: 1.6em;
	margin-bottom: 0.5em;
	text-wrap: balance;
}

.single-docs #post .doc-scrollable :is(h2, h3, h4):first-child,
.single-docs #post .doc-scrollable :is(h2, h3, h4) + :is(h2, h3, h4) {
	margin-top: 0;
}

/*
 * Links im Text: vorher Textfarbe ohne Unterstreichung, also nicht als Link
 * erkennbar. Ausgenommen: Bild-Links (Lightbox), Buttons, Anker-Symbole und
 * die EazyDocs-Listen „Anleitungen“ (.article_list) und Unterseiten (.children).
 * Unterstrichen, obwohl tomedo.de Links nie unterstreicht: Im Fließtext hebt
 * sich das Rot (#ad153d) kaum vom grauen Text ab (Kontrast etwa 1,1 : 1,
 * WCAG verlangt 3 : 1, wenn nur die Farbe einen Link kennzeichnet).
 * Farben aus marke.css: --tomedo-red #ad153d, Hover --tomedo-dark-red #8e0f31.
 */
.single-docs #post .doc-scrollable :is(p, li, td, th, figcaption) a:not(.wp-block-button__link, .anchorjs-link, .article_list a, .children a):not(:has(img)) {
	color: var(--tomedo-red, #ad153d);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.2em;
}

.single-docs #post .doc-scrollable :is(p, li, td, th, figcaption) a:not(.wp-block-button__link, .anchorjs-link, .article_list a, .children a):not(:has(img)):is(:hover, :focus-visible) {
	color: var(--tomedo-dark-red, #8e0f31);
	text-decoration-thickness: 2px;
}

/* Handy: lange zusammengesetzte Wörter trennen (Sprache aus <html lang>). */
@media (max-width: 767px) {

	.single-docs #post .doc-scrollable :is(p, li, td) {
		hyphens: auto;
	}
}
