/* -------------------------------------------------------------------------
 * Vollbildseite (templates/fullscreen-plan.php): Programmplan ?ec_plan,
 * Zeitplan ?ec_plan&ec_view=timetable.
 *
 * Gleiches Geruest wie die Vollbild-Karte des Ausstellerplugins
 * (eem-fullscreen.css): fester Kopf 56px, sicherer
 * Bereich des Geraets, feste Leisten anderer Plugins als Variablen.
 * Anders als die Karte scrollt der Inhalt mit dem Fenster - schwebende
 * Suche, "Mehr laden" und die Rueckkehr an die Scroll-Position haengen
 * daran.
 * ---------------------------------------------------------------------- */
html.ec-fs-html {
	margin: 0 !important;
	padding: 0 !important;
	/* Feste Leisten anderer Plugins (App-Navigation unten, Admin-Leiste oben)
	   misst ec-fullscreen.js: --ec-fs-top / --ec-fs-bottom. Die Leiste deckt
	   den sicheren Bereich des Geraets dann selbst ab. */
	--ec-fs-safe-top: env(safe-area-inset-top, 0px);
	--ec-fs-safe-bottom: env(safe-area-inset-bottom, 0px);
	--ec-fs-header: 56px;
	/* Untere Leiste im App-Modus (siehe Abschnitt "App-Modus" unten): ihre
	   Hoehe ohne sicheren Bereich, und was der Inhalt dafuer freihaelt. */
	--ec-fs-navh: 60px;
	--ec-fs-nav-space: 0px;
}

html.ec-fs-html.ec-fs-has-top {
	--ec-fs-safe-top: 0px;
}

html.ec-fs-html.ec-fs-has-bottom {
	--ec-fs-safe-bottom: 0px;
}

body.ec-fullscreen-page {
	margin: 0 !important;
	padding: 0 !important;
	background: #fafafa;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.ec-fs-header {
	position: fixed;
	top: var(--ec-fs-top, 0px);
	left: 0;
	right: 0;
	/* Ueber Kacheln und Zeitplan (ein Eintrag hebt sich beim Ueberfahren auf
	   z-index 2000), unter den Modals (siehe unten) und unter dem
	   aufgeklappten Filter-Sheet der schwebenden Suche. */
	z-index: 5000;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	gap: 12px;
	height: calc(var(--ec-fs-header) + var(--ec-fs-safe-top));
	margin: 0;
	padding: var(--ec-fs-safe-top) 14px 0;
	/* Farben aus "Vollbild & App" (EC_Fullscreen_App::style_vars()). */
	background: var(--ec-fs-header-bg, #fbfbfb);
	border-bottom: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.05);
}

.ec-fs-logo img,
.ec-fs-logo .custom-logo {
	display: block;
	width: auto;
	max-height: 40px;
	max-width: 140px;
	border-radius: 5px;
}

.ec-fs-title {
	flex: 1 1 auto;
	min-width: 0;
	margin: 0;
	padding: 0;
	overflow: hidden;
	color: var(--ec-fs-header-fg, #1d2327);
	font-size: 17px;
	font-weight: 700;
	line-height: 1.25;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Knoepfe im Kopf fuehren zu anderem Inhalt (Zeitplan, Sprecher, Karte ...)
   und sind deshalb nur umrandet - gefuellt waere die Optik einer aktiven
   Auswahl (wie das aktive Ziel der unteren Leiste). Gegenstueck .eem-fs-list
   in eem-map.css. .ec-fs-crosslink bleibt als Klasse fuer eigene Vorlagen. */
.ec-fs-switch {
	flex: none;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 12px;
	border: 2px solid var(--ec-fs-icon, var(--ec-primary, #f76b15));
	border-radius: 20px;
	background: #fff;
	color: var(--ec-fs-icon, var(--ec-primary, #f76b15));
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
}

.ec-fs-switch:hover,
.ec-fs-switch:focus-visible {
	color: var(--ec-fs-icon, var(--ec-primary, #f76b15));
	background: #fff;
	filter: brightness(0.97);
}

.ec-fs-switch .dashicons {
	width: 20px;
	height: 20px;
	font-size: 20px;
	line-height: 1;
}

/* Symbole der Navigation: Dateien aus assets/icons als Maske, die Farbe
   kommt aus currentColor (Pfad als --ec-fs-ico, EC_Fullscreen_App). */
.ec-fs-ico {
	flex: none;
	display: inline-block;
	width: 20px;
	height: 20px;
	background-color: currentColor;
	-webkit-mask: var(--ec-fs-ico) center / contain no-repeat;
	mask: var(--ec-fs-ico) center / contain no-repeat;
}

/* Eigene Icon-Klassen (z. B. Dashicons oder Theme-Icons) */
.ec-fs-custom-ico {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 20px;
	height: 20px;
	font-size: 20px;
	line-height: 1;
	color: currentColor;
}

/* Inhalt: scrollt normal unter dem festen Kopf. */
.ec-fs-main {
	display: block;
	box-sizing: border-box;
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0 auto;
	padding: calc(var(--ec-fs-header) + var(--ec-fs-safe-top) + var(--ec-fs-top, 0px) + 16px) 16px calc(32px + var(--ec-fs-bottom, 0px) + var(--ec-fs-safe-bottom) + var(--ec-fs-nav-space));
}

/* Mit schwebender Suche reserviert der Kalender den Platz unter der Liste
   selbst (Hoehe der Leiste + 70px, siehe updateFloatingBottomOffset). Der
   Platz fuer Leiste und Rand hier kaeme doppelt dazu - eine grosse Leere
   zwischen "Mehr laden" und der Suchpille. */
.ec-fs-main:has(.ec-floating-search-active) {
	padding-bottom: calc(var(--ec-fs-bottom, 0px) + var(--ec-fs-safe-bottom));
}

/* Eigene Stapelebene fuer den Inhalt - auf normalen Seiten leistet das der
   Abschnitt des Themes (.ec-section-elevated u. a.). Ohne sie konkurrieren
   die Ebenen im Inhalt direkt mit Elementen, die der Kalender an body haengt:
   Zeitplan-Eintraege (z-index 200, beim Ueberfahren 2000) laegen ueber dem
   schwebenden Raumkopf (.ec-timetable-floating-layer, 90). Ist das Filter-
   Blatt der schwebenden Suche offen, hebt sich der Inhalt wie auf normalen
   Seiten (ec-main.css, body.ec-filter-sheet-open) ueber Kopf und Leiste. */
.ec-fs-main {
	position: relative;
	z-index: 1;
}

body.ec-filter-sheet-open .ec-fs-main {
	z-index: 999990;
}

.ec-fs-plan-page .ec-fs-main,
.ec-fs-timetable-page .ec-fs-main,
.ec-fs-ticker-page .ec-fs-main,
.ec-fs-speakers-page .ec-fs-main {
	max-width: 1400px;
}

.ec-fs-info-page .ec-fs-main {
	max-width: 900px;
}

/* Rechtliche Links (EC_Fullscreen_App::legal_links()): Datenschutz,
   Impressum, Kontakt - dezent in einer Reihe unter dem Inhalt. Gegenstueck
   .eem-fs-legal in eem-fullscreen.css. */
.ec-fs-legal {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 4px 18px;
	margin: 28px 0 0;
	padding: 14px 0 0;
	border-top: 1px solid rgba(0, 0, 0, 0.08);
}

.ec-fs-legal a.ec-fs-legal-link {
	color: #6b7280;
	font-size: 12.5px;
	line-height: 1.4;
	text-decoration: none;
}

.ec-fs-legal a.ec-fs-legal-link:hover,
.ec-fs-legal a.ec-fs-legal-link:focus-visible {
	color: var(--ec-fs-icon, var(--ec-primary, #f76b15));
	text-decoration: underline;
}

.ec-fs-infopage {
	box-sizing: border-box;
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.08);
	border-radius: 12px;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
	padding: 24px 24px 36px;
	color: #1d2327;
	font-size: 15px;
	line-height: 1.65;
}

.ec-fs-infopage.ec-fs-infopage--clean {
	background: transparent;
	border: none;
	border-radius: 0;
	box-shadow: none;
	padding: 4px 0 32px;
}

.ec-fs-infopage h1,
.ec-fs-infopage h2,
.ec-fs-infopage h3,
.ec-fs-infopage h4 {
	color: #1d2327;
	line-height: 1.3;
	margin-top: 1.4em;
	margin-bottom: 0.5em;
}

.ec-fs-infopage h1:first-child,
.ec-fs-infopage h2:first-child,
.ec-fs-infopage h3:first-child {
	margin-top: 0;
}

.ec-fs-infopage p {
	margin: 0 0 1em;
}

.ec-fs-infopage a {
	color: var(--ec-fs-icon, #f76b15);
	text-decoration: underline;
}

.ec-fs-infopage img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
}

.ec-fs-infopage ul,
.ec-fs-infopage ol {
	margin: 0 0 1em 1.5em;
	padding: 0;
}

.ec-fs-infopage li {
	margin-bottom: 0.35em;
}

/* -------------------------------------------------------------------------
 * App-Modus: untere Leiste (EC_Fullscreen_App::bottom_nav()).
 *
 * html.ec-fs-app      Leiste auf Touch-Geraeten (Smartphone, Tablet - in
 *                     jeder Ausrichtung), der Desktop bleibt klassisch.
 *                     Touch = (any-pointer: coarse) oder html.ec-fs-touch
 *                     (navigator.maxTouchPoints, Vorlage + ec-fullscreen.js).
 *                     Bis 17.10.2026 (hover: none) and (pointer: coarse) -
 *                     Samsung Internet meldet auf Galaxy-Geraeten (S Pen,
 *                     Air View) hover: hover, die Leiste blieb dort weg.
 * html.ec-fs-app-all  erzwungen per ?ec_app=1: auf allen Geraeten.
 * Kein Ausweichen vor fremden Leisten (bis 16.10.2026 html.ec-fs-nav-yield -
 * schlug beim Samsung-Browser an). In einer PWA mit eigener Navigation den
 * Link mit &ec_app=0 einbinden.
 * Aktiv bedeutet: Leiste zeigen, Knoepfe der Ziele im Kopf ausblenden (der
 * Umschalter Programm/Zeitplan bleibt), Platz unter dem Inhalt freihalten.
 * ---------------------------------------------------------------------- */
.ec-fs-bottomnav {
	display: none;
	position: fixed;
	left: 0;
	right: 0;
	bottom: var(--ec-fs-bottom, 0px);
	/* Wie der Kopf: ueber Inhalt und Zeitplan, unter den Modals. */
	z-index: 5000;
	box-sizing: border-box;
	height: calc(var(--ec-fs-navh) + var(--ec-fs-safe-bottom));
	margin: 0;
	padding: 0 4px var(--ec-fs-safe-bottom);
	background: var(--ec-fs-nav-bg, #fbfbfb);
	border-top: 1px solid rgba(0, 0, 0, 0.08);
	box-shadow: 0 -1px 4px rgba(0, 0, 0, 0.05);
	align-items: stretch;
	justify-content: space-around;
}

html.ec-fs-app.ec-fs-app-all,
html.ec-fs-app.ec-fs-touch {
	--ec-fs-nav-space: var(--ec-fs-navh);
}

html.ec-fs-app.ec-fs-app-all .ec-fs-bottomnav,
html.ec-fs-app.ec-fs-touch .ec-fs-bottomnav {
	display: flex;
}

html.ec-fs-app.ec-fs-app-all .ec-fs-header .ec-fs-navlink,
html.ec-fs-app.ec-fs-touch .ec-fs-header .ec-fs-navlink {
	display: none;
}

@media (any-pointer: coarse) {
	html.ec-fs-app {
		--ec-fs-nav-space: var(--ec-fs-navh);
	}

	html.ec-fs-app .ec-fs-bottomnav {
		display: flex;
	}

	html.ec-fs-app .ec-fs-header .ec-fs-navlink {
		display: none;
	}
}

.ec-fs-navitem {
	flex: 1 1 0;
	min-width: 0;
	max-width: 160px;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	padding: 0 2px;
	color: var(--ec-fs-nav-fg, #1d2327);
	font-size: 11px;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
}

.ec-fs-navitem:hover,
.ec-fs-navitem:focus-visible {
	color: var(--ec-fs-nav-fg, #1d2327);
	text-decoration: none;
}

/* Symbol in der Farbe "Icons"; das aktive Ziel bekommt eine Pille in dieser
   Farbe, das Symbol darin nimmt die Farbe der Leiste an. */
.ec-fs-navpill {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 28px;
	border-radius: 14px;
	color: var(--ec-fs-icon, #f76b15);
	transition: background-color 0.15s ease;
}

.ec-fs-navpill .ec-fs-ico {
	width: 22px;
	height: 22px;
}

.ec-fs-navpill .ec-fs-custom-ico {
	width: 22px;
	height: 22px;
	font-size: 22px;
	line-height: 1;
}

.ec-fs-navitem.is-active .ec-fs-navpill {
	background: var(--ec-fs-icon, #f76b15);
	color: var(--ec-fs-nav-bg, #fbfbfb);
}

.ec-fs-navitem.is-active .ec-fs-navlabel {
	font-weight: 700;
}

.ec-fs-navlabel {
	max-width: 100%;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* Eingebettet (?ec_embed=1, z. B. im iframe): ohne Kopf und Leiste. */
html.ec-fs-html.ec-fs-embed {
	--ec-fs-header: 0px;
	--ec-fs-safe-top: 0px;
}

/* Modals (Teilen, iCal, Detail, Hallenplan) haengen in #ec-modal-container
   am Seitenende. Eigene, hohe Ebene fuer den Behaelter: Er traegt die Klasse
   .ec-event-calendar-app (container-type) - bildet er dadurch eine eigene
   Stapelebene, laegen alle Modals sonst unter dem festen Kopf. */
html.ec-fs-html #ec-modal-container {
	position: relative;
	z-index: 100000;
}

/* Die schwebende Suche liegt auf der hoechsten Ebene (2147483647). Auf
   normalen Seiten deckelt der Theme-Abschnitt (.ec-section-elevated) sie
   unter den Modals; hier gibt es keinen solchen Abschnitt, sie laege ueber
   jedem Pop-up. Solange eines offen ist, bleibt sie daher weg - wie der
   schwebende Spaltenkopf des Zeitplans (ec-timetable.css, ec-modal-open). */
html.ec-fs-html.ec-modal-open .ec-toolbar.ec-floating-toolbar,
html.ec-fs-html.ec-modal-open .ec-toolbar.ec-floating-toolbar * {
	/* auch die Kinder: der Filter-Knopf setzt visibility selbst auf visible */
	visibility: hidden !important;
	pointer-events: none !important;
}

/* Zeitplan: Der schwebende Spaltenkopf (ec-timetable.js) sitzt unter dem
   Kopf statt fest 25px unter dem Fensterrand. --ec-fs-float-top setzt
   ec-fullscreen.js in Pixeln (der Zeitplan rechnet mit parseFloat). */
html.ec-fs-html body .ec-timetable-floating-layer {
	--ec-float-top: var(--ec-fs-float-top, 81px);
}

/* Elemente des Themes aus wp_footer() im normalen Fluss (Fussbereiche,
   Abstaende) wuerden die Seite verlaengern; ec-fullscreen.js blendet sie aus.
   Feste Elemente (Cookie-Hinweis, App-Navigation) bleiben. */
.ec-fs-flow-hidden {
	display: none !important;
}

@media (max-width: 600px) {
	.ec-fs-title {
		font-size: 15px;
	}

	.ec-fs-switch {
		padding: 6px; /* + 2px Rand */
	}

	.ec-fs-switch-text {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip: rect(0 0 0 0);
		white-space: nowrap;
	}

	.ec-fs-main {
		padding-left: 10px;
		padding-right: 10px;
	}
}
