/*
 * Lumen – extras.css
 * Minimal-Stylesheet für Accessibility und feine Frontend-Verbesserungen.
 * Wird nur geladen, wenn die Datei Inhalt hat (siehe functions.php).
 */

/* ---------- 1. Skip-Link für Tastaturnutzer ---------- */
.skip-link {
	position: absolute;
	left: -9999px;
	top: auto;
	width: 1px;
	height: 1px;
	overflow: hidden;
	z-index: 100000;
}
.skip-link:focus {
	left: 1rem;
	top: 1rem;
	width: auto;
	height: auto;
	padding: 0.75rem 1rem;
	background: var(--wp--preset--color--contrast);
	color: var(--wp--preset--color--base);
	border-radius: 6px;
	text-decoration: none;
}

/* ---------- 2. Sichtbarer Fokus-Ring für Tastatur-Navigation ---------- */
:where(a, button, .wp-block-button__link, input, textarea, select, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--wp--preset--color--accent);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Mausklicks sollen den Fokusring nicht zeigen */
:where(a, button, .wp-block-button__link):focus:not(:focus-visible) {
	outline: none;
}

/* ---------- 3. Reduced Motion respektieren ---------- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
		scroll-behavior: auto !important;
	}
}

/* ---------- 4. Bilder ohne kaputtes Layout ---------- */
img,
.wp-block-image img {
	max-width: 100%;
	height: auto;
}

/* ---------- 5. Summary (Details-Block) hübscher ---------- */
.wp-block-details > summary {
	cursor: pointer;
	font-weight: 600;
	padding: 0.25rem 0;
	list-style: none;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
}
.wp-block-details > summary::-webkit-details-marker {
	display: none;
}
.wp-block-details > summary::after {
	content: "+";
	font-size: 1.25em;
	line-height: 1;
	color: var(--wp--preset--color--muted);
	transition: transform 200ms ease;
}
.wp-block-details[open] > summary::after {
	content: "−";
}

/* ---------- 6. Suchfeld-Feinheiten ---------- */
.wp-block-search__input {
	border: 1px solid var(--wp--preset--color--border);
	padding: 0.75rem 1rem;
	border-radius: 999px;
	font-size: 1rem;
}
.wp-block-search__input:focus {
	border-color: var(--wp--preset--color--accent);
}

/* ---------- 7. Tabellen lesbarer machen ---------- */
.wp-block-table table {
	border-collapse: collapse;
	width: 100%;
}
.wp-block-table th,
.wp-block-table td {
	border-bottom: 1px solid var(--wp--preset--color--border);
	padding: 0.75rem 1rem;
	text-align: left;
}
.wp-block-table th {
	font-weight: 600;
	background: var(--wp--preset--color--base-alt);
}

/* ---------- 8. Print-Styles ---------- */
@media print {
	header, footer, .wp-block-navigation, .wp-block-search, .wp-block-comments-form {
		display: none !important;
	}
	body {
		font-size: 11pt;
		color: #000;
		background: #fff;
	}
	a::after {
		content: " (" attr(href) ")";
		font-size: 0.85em;
		color: #555;
	}
}
