/*
Theme Name: PraxisIQ Cowork
Theme URI: https://praxisiq.example/theme
Author: ecomedical AG
Author URI: https://ecomedical.ch
Description: Block-Theme für das Compliance-Portal PraxisIQ Cowork. Warme, ruhige Gestaltung für Arztpraxen und Kliniken in der DACH-Region, abgestimmt auf das Plugin PraxisIQ Cowork. Seitenbreite 1240 px, eigener Abstandsmaßstab, Startseite als bearbeitbare Block-Vorlage.
Requires at least: 7.1
Tested up to: 7.1
Requires PHP: 8.1
Version: 1.3.0
License: GPL-2.0-or-later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: praxisiq-cowork-theme
Tags: block-theme, full-site-editing, healthcare, one-column, accessibility-ready
*/

/* Feinschliff, der sich in theme.json nicht abbilden lässt. */

:root {
	--pq-focus: #B8792A;
}

body {
	text-rendering: optimizeLegibility;
	-webkit-font-smoothing: antialiased;
}

:where(a):focus-visible,
:where(button):focus-visible,
:where(input):focus-visible,
:where(select):focus-visible,
:where(textarea):focus-visible {
	outline: 2px solid var(--pq-focus);
	outline-offset: 2px;
	border-radius: 4px;
}

/* Sprungmarke für die Tastaturbedienung. */
.pq-skip-link {
	position: absolute;
	left: -9999px;
	top: 0;
	z-index: 999;
	padding: 10px 18px;
	background: var(--wp--preset--color--surface);
	border: 1px solid var(--wp--preset--color--line);
	border-radius: 0 0 10px 0;
	font-weight: 600;
	text-decoration: none;
}
.pq-skip-link:focus {
	left: 0;
}

/* Die Portalseite läuft randlos, ohne Theme-Abstände. */
body.praxisiq-portal .wp-site-blocks > * {
	margin-block-start: 0;
}
body.praxisiq-portal .wp-block-post-content,
body.praxisiq-portal .entry-content {
	max-width: none;
	padding: 0;
}
body.praxisiq-portal .wp-block-post-title,
body.praxisiq-portal .wp-block-template-part.site-footer {
	display: none;
}

/* Lesbare Textbreite auf Inhaltsseiten. */
.entry-content > * {
	margin-block-start: 1.1em;
}

hr.wp-block-separator {
	border: none;
	border-top: 1px solid var(--wp--preset--color--line);
	opacity: 1;
}

table {
	border-collapse: collapse;
}

@media print {
	.site-header,
	.site-footer,
	.pq-skip-link {
		display: none !important;
	}
}

/* --------------------------------------------------------------------------
   Startseite
   -------------------------------------------------------------------------- */

/*
 * Die Abschnitte der Startseite bringen ihren eigenen senkrechten Abstand mit.
 * Der Standardabstand zwischen den Blöcken der obersten Ebene erzeugt sonst
 * einen sichtbaren Streifen zwischen Kopfzeile und erstem Abschnitt.
 */
.wp-site-blocks > .wp-block-template-part + *,
.wp-site-blocks > * + .wp-block-template-part {
	margin-block-start: 0;
}

/*
 * Fließtext bleibt lesbar, auch wenn der Abschnitt die volle Seitenbreite
 * nutzt. 62 Zeichen sind für Sätze dieser Länge ein guter Zeilenumbruch.
 */
/*
 * Diese Absätze stehen in einer Gruppe im normalen Fluss. Der eingeschränkte
 * Layout-Modus zentriert nur direkte Kinder — dort würde ein schmalerer
 * Absatz in der Mitte statt an der linken Abschnittskante landen.
 */
.praxisiq-measure {
	max-width: 62ch;
}

/* Sanftes Springen zu den Ankerpunkten der Kopfzeile. */
@media (prefers-reduced-motion: no-preference) {
	html {
		scroll-behavior: smooth;
	}
}
:target {
	scroll-margin-top: 90px;
}

/* Die Faktenliste im Einstieg: etwas mehr Luft zwischen den Punkten. */
.praxisiq-facts li + li {
	margin-top: 10px;
}

/* Die Kopfzeile bleibt beim Scrollen stehen — auf kleinen Geräten nicht. */
@media (min-width: 782px) {
	.wp-site-blocks > .site-header {
		position: sticky;
		top: var(--wp-admin--admin-bar--height, 0px);
		z-index: 20;
	}
}

/*
 * Seitenränder auf kleinen Geräten. Die responsive Variante in theme.json
 * (styles.spacing.@mobile) wird von dieser WordPress-Fassung nicht als
 * Media Query ausgegeben; diese Regel stellt das Ergebnis sicher.
 */
@media (max-width: 781px) {
	body {
		--wp--style--root--padding-left: var(--wp--preset--spacing--30);
		--wp--style--root--padding-right: var(--wp--preset--spacing--30);
	}
}
