/* EB Anmeldung · Formular, Termindaten, Abmeldeseite.
 * Farben und Schriften kommen vom Theme über diese Variablen. */
:root {
	--eb-ink: #1a1a1a;
	--eb-ink-2: #55524c;
	--eb-ink-3: #6e6a63;
	--eb-paper: #fffdf9;
	--eb-paper-2: #f6f4ef;
	--eb-line: #e2ded6;
	--eb-accent: #1a1a1a;
	--eb-accent-soft: #f3f1ec;
	--eb-focus: #fbba00;
	--eb-error: #c0392b;
	--eb-ok: #2f7a4f;
	--eb-radius: 8px;
	--eb-radius-lg: 14px;
	--eb-font-display: inherit;
	--eb-ease: cubic-bezier(.16, 1, .3, 1);
}

.eb-card {
	background: var(--eb-paper);
	border: 1px solid var(--eb-line);
	border-radius: var(--eb-radius-lg);
	padding: clamp(20px, 3vw, 32px);
	box-shadow: 0 1px 2px rgb(20 20 20 / .04), 0 12px 32px -12px rgb(20 20 20 / .12);
	scroll-margin-top: 24px;
	color: var(--eb-ink);
}
.eb-card__title {
	font-family: var(--eb-font-display);
	font-size: 1.6rem;
	line-height: 1.15;
	font-weight: 700;
	margin: 0 0 1.25rem;
	text-wrap: balance;
	overflow-wrap: anywhere;
}
.eb-card--done .eb-card__title { margin-bottom: .5rem; }
.eb-card__text { margin: 0 0 1.25rem; color: var(--eb-ink-2); }

.eb-form { margin: 0; }
.eb-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 16px; }
.eb-field { display: flex; flex-direction: column; gap: 6px; margin: 0 0 16px; min-width: 0; }
.eb-field > label, .eb-fieldset legend { font-size: .9rem; font-weight: 500; }
.eb-opt { color: var(--eb-ink-3); font-weight: 400; }
.eb-field input[type="text"],
.eb-field input[type="email"],
.eb-field input[type="tel"],
.eb-field input[type="number"],
.eb-field input[type="date"],
.eb-field select,
.eb-field textarea {
	width: 100%;
	box-sizing: border-box;
	border: 1.5px solid var(--eb-line);
	background: var(--eb-paper);
	color: var(--eb-ink);
	border-radius: var(--eb-radius);
	padding: 12px 14px;
	font: inherit;
	font-size: 17px; /* verhindert Zoom auf dem iPhone */
	caret-color: var(--eb-ink);
	transition: border-color .14s var(--eb-ease), box-shadow .14s var(--eb-ease);
}
.eb-field input:hover, .eb-field select:hover, .eb-field textarea:hover { border-color: color-mix(in oklab, var(--eb-line), var(--eb-ink) 25%); }
.eb-field input:focus-visible, .eb-field select:focus-visible, .eb-field textarea:focus-visible {
	outline: none;
	border-color: var(--eb-ink);
	box-shadow: 0 0 0 3px var(--eb-focus);
}
.eb-field.has-error input, .eb-field.has-error select, .eb-field.has-error textarea { border-color: var(--eb-error); }
.eb-field ::placeholder { color: var(--eb-ink-3); opacity: 1; }
.eb-hint { margin: 0; font-size: .875rem; line-height: 1.45; color: var(--eb-ink-3); }

/* Datei-Feld: gestrichelte Fläche mit eigenem Knopf statt Browser-Standard. */
.eb-field input[type="file"] {
	width: 100%;
	box-sizing: border-box;
	padding: 10px;
	border: 1.5px dashed color-mix(in oklab, var(--eb-line), var(--eb-ink) 30%);
	border-radius: var(--eb-radius);
	background: var(--eb-paper-2);
	color: var(--eb-ink-2);
	font: inherit;
	font-size: 15px;
	cursor: pointer;
	transition: border-color .14s var(--eb-ease), background-color .14s var(--eb-ease);
}
.eb-field input[type="file"]::file-selector-button {
	margin-right: 12px;
	padding: 10px 16px;
	border: 1.5px solid var(--eb-ink);
	border-radius: calc(var(--eb-radius) - 2px);
	background: var(--eb-paper);
	color: var(--eb-ink);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .14s var(--eb-ease);
}
.eb-field input[type="file"]:hover { border-color: var(--eb-ink); background: var(--eb-paper); }
.eb-field input[type="file"]:hover::file-selector-button { background: var(--eb-accent-soft, var(--eb-paper-2)); }
.eb-field input[type="file"]:focus-visible { outline: none; border-style: solid; border-color: var(--eb-ink); box-shadow: 0 0 0 3px var(--eb-focus); }
.eb-field.has-error input[type="file"] { border-color: var(--eb-error); }

/* Zusätzliche Felder: Raster für halbe Breite, Auf- und Zuklappen bei Wenn-dann.
 * Höhe über grid-template-rows (0fr ↔ 1fr), damit nichts springt. Auf 280 ms, zu 220 ms. */
.eb-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 16px; }
.eb-item {
	grid-column: 1 / -1;
	display: grid;
	grid-template-rows: 1fr;
	min-width: 0;
	transition: grid-template-rows .28s var(--eb-ease), opacity .24s var(--eb-ease) .04s, transform .28s var(--eb-ease);
}
.eb-item--half { grid-column: auto; }
.eb-item[hidden] { display: none; }
/* Polster und Gegenmaß geben dem Fokusrahmen Platz, obwohl der Inhalt beim Zuklappen abgeschnitten wird. */
.eb-item__in { min-height: 0; overflow: hidden; padding: 4px; margin: -4px; }
.eb-form.is-js .eb-item.is-off {
	grid-template-rows: 0fr;
	opacity: 0;
	transform: translateY(-6px);
	transition-duration: .22s, .14s, .22s;
	transition-delay: 0s;
}
.eb-names { display: flex; flex-direction: column; margin-top: 4px; }
.eb-names .eb-field { margin: 12px 0 0; }
.eb-names label { font-weight: 400; color: var(--eb-ink-2); }

.eb-section { margin: 8px 0 16px; padding-top: 20px; border-top: 1px solid var(--eb-line); }
.eb-section__title { font-family: var(--eb-font-display); font-size: 1.2rem; font-weight: 700; line-height: 1.2; margin: 0 0 4px; text-wrap: balance; }
.eb-section__text { margin: 0; color: var(--eb-ink-2); font-size: .95rem; line-height: 1.5; }
.eb-error { color: var(--eb-error); font-size: .875rem; }

.eb-fieldset { border: 0; padding: 0; margin: 0; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.eb-fieldset legend { padding: 0; margin-bottom: 6px; }
.eb-seg {
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: minmax(0, 1fr);
	gap: 3px;
	padding: 3px;
	border: 1.5px solid var(--eb-line);
	border-radius: var(--eb-radius);
}
.eb-seg input { position: absolute; opacity: 0; pointer-events: none; }
.eb-seg label { text-align: center; padding: 9px 10px; border-radius: 5px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.eb-seg input:checked + label { background: var(--eb-ink); color: var(--eb-paper); }
.eb-seg input:focus-visible + label { box-shadow: 0 0 0 3px var(--eb-focus); }

.eb-pills { display: flex; flex-wrap: wrap; gap: 8px; }
.eb-pills input { position: absolute; opacity: 0; pointer-events: none; }
.eb-pills label {
	padding: 10px 16px;
	border: 1.5px solid var(--eb-line);
	border-radius: var(--eb-radius);
	cursor: pointer;
	font-weight: 500;
	transition: background .14s var(--eb-ease), border-color .14s var(--eb-ease), color .14s var(--eb-ease);
}
.eb-pills label:hover { border-color: color-mix(in oklab, var(--eb-line), var(--eb-ink) 35%); }
.eb-pills input:checked + label { background: var(--eb-ink); border-color: var(--eb-ink); color: var(--eb-paper); }
.eb-pills input:focus-visible + label { box-shadow: 0 0 0 3px var(--eb-focus); }
.eb-field.has-error .eb-pills label, .eb-field.has-error .eb-seg { border-color: var(--eb-error); }
.eb-checks { display: flex; flex-direction: column; gap: 10px; }
.eb-checks .eb-check, .eb-check--consent { color: var(--eb-ink); font-size: 1rem; }

.eb-check { display: flex; gap: 10px; align-items: flex-start; font-size: .92rem; color: var(--eb-ink-2); cursor: pointer; }
.eb-check input { width: 20px; height: 20px; margin: 2px 0 0; accent-color: var(--eb-ink); flex: none; }
.eb-check a, .eb-small a { color: var(--eb-ink); text-underline-offset: 3px; }

/* Hinweis zur Abmeldung: ruhiger Text über dem Haken, ohne Kasten. */
.eb-bedenken { display: flex; flex-direction: column; gap: 12px; }
.eb-bedenken__text { margin: 0; font-size: .875rem; line-height: 1.55; color: var(--eb-ink-2); text-wrap: pretty; }
.eb-bedenken__text strong { font-weight: 600; color: var(--eb-ink); }

.eb-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.eb-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	box-sizing: border-box;
	border: 0;
	border-radius: var(--eb-radius);
	background: var(--eb-ink);
	color: var(--eb-paper);
	font: inherit;
	font-weight: 600;
	font-size: 1.1rem;
	padding: 16px 20px;
	cursor: pointer;
	white-space: nowrap;
	text-decoration: none;
	transition: background .14s var(--eb-ease), color .14s var(--eb-ease), transform .14s var(--eb-ease);
}
.eb-button:hover { background: var(--eb-focus); color: var(--eb-ink); }
.eb-button:active { transform: translateY(1px); }
.eb-button:focus-visible { outline: 3px solid var(--eb-focus); outline-offset: 3px; }
.eb-small { font-size: .875rem; color: var(--eb-ink-3); margin: 16px 0 0; line-height: 1.5; }

.eb-notice { background: var(--eb-accent-soft); border-radius: var(--eb-radius); padding: 12px 14px; margin: 0 0 16px; font-size: .95rem; }
.eb-notice--error { background: color-mix(in oklab, var(--eb-error) 10%, var(--eb-paper)); color: color-mix(in oklab, var(--eb-error), black 25%); }

.eb-tick {
	width: 56px; height: 56px; border-radius: 50%;
	background: var(--eb-ink); color: var(--eb-focus);
	display: grid; place-items: center; margin-bottom: 20px;
}

/* Termindaten */
.eb-facts { display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; list-style: none; font-weight: 500; font-size: 1.1rem; }
.eb-facts li { display: flex; align-items: center; gap: 8px; }
.eb-icon { flex: none; }
.eb-facts-list { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 10px 24px; margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--eb-line); font-size: 1rem; }
.eb-facts-list dt { color: var(--eb-ink-3); }
.eb-facts-list dd { margin: 0; font-weight: 500; }

/* Unterstützt von: Logos in ruhiger Reihe, gleiche optische Höhe, Farbe bleibt. */
.eb-sponsors { margin: 32px 0 0; padding-top: 24px; border-top: 1px solid var(--eb-line); }
.eb-sponsors__title { margin: 0 0 16px; font-family: inherit; font-size: 1rem !important; line-height: 1.4; font-weight: 400; color: var(--eb-ink-3); letter-spacing: 0; text-transform: none; }
.eb-sponsors__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 20px 40px; }
.eb-sponsors__list li { margin: 0; min-width: 0; }
.eb-sponsors__list a { display: block; border-radius: 4px; transition: opacity .14s var(--eb-ease); }
.eb-sponsors__list a:hover { opacity: .75; }
.eb-sponsors__list a:focus-visible { outline: 3px solid var(--eb-focus); outline-offset: 4px; }
.eb-sponsors__logo { display: block; width: auto !important; height: auto; max-height: 64px; max-width: min(200px, 100%); object-fit: contain; }
@media (max-width: 600px) { .eb-sponsors__list { gap: 16px 28px; } .eb-sponsors__logo { max-height: 52px; max-width: 160px; } }
/* Im gelben Kopf: weiße Fläche mit runden Ecken, so breit wie die Logos (wächst mit, bricht in Reihen um). */
.eb-sponsors--kopf { margin: 0; padding: 16px 24px 22px; border: 0; border-radius: var(--eb-radius-lg); background: var(--eb-paper); color: var(--eb-ink); }
.eb-sponsors--kopf .eb-sponsors__title { margin: 0 0 14px; font-size: .875rem !important; color: var(--eb-ink-2); }
.eb-sponsors--kopf .eb-sponsors__list { gap: 18px 32px; }
/* Feste Höhe statt Höchstwert: quadratische und breite Logos wirken gleich groß, kleine Bilder werden mit hochgezogen. */
.eb-sponsors--kopf .eb-sponsors__logo { height: 104px !important; max-height: none; width: auto !important; max-width: 240px; }
.eb-sponsors--kopf:has(li:nth-child(4)) .eb-sponsors__logo { height: 80px !important; max-width: 180px; }
@media (max-width: 600px) { .eb-sponsors--kopf .eb-sponsors__logo { height: 84px !important; max-width: 180px; } .eb-sponsors--kopf:has(li:nth-child(4)) .eb-sponsors__logo { height: 64px !important; max-width: 140px; } }
@media (prefers-reduced-motion: reduce) { .eb-sponsors__list a { transition: none; } }
.eb-seats { display: inline-flex; align-items: center; gap: 8px; }
.eb-seats i { width: 8px; height: 8px; border-radius: 50%; background: var(--eb-ok); display: inline-block; }
.eb-seats.is-full i { background: var(--eb-error); }

/* Terminübersicht */
.eb-termine { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--eb-line); }
.eb-termin a {
	display: grid;
	grid-template-columns: minmax(150px, 220px) minmax(0, 1fr) auto 20px;
	gap: 4px 24px;
	align-items: baseline;
	padding: 20px 4px;
	border-bottom: 1px solid var(--eb-line);
	color: var(--eb-ink);
	text-decoration: none;
	transition: background .14s var(--eb-ease);
}
.eb-termin a:hover { background: var(--eb-accent-soft); }
.eb-termin a:focus-visible { outline: 3px solid var(--eb-focus); outline-offset: -3px; }
.eb-termin__date { color: var(--eb-ink-2); font-variant-numeric: tabular-nums; }
.eb-termin__title { font-family: var(--eb-font-display); font-weight: 700; font-size: 1.35rem; line-height: 1.2; }
.eb-termin__place { grid-column: 2; color: var(--eb-ink-3); font-size: .95rem; }
.eb-termin__status { grid-column: 3; grid-row: 1; font-size: .85rem; font-weight: 500; white-space: nowrap; }
.eb-termin__status.is-full, .eb-termin__status.is-closed { color: var(--eb-ink-3); }
.eb-termin__status { display: inline-flex; align-items: center; gap: 7px; }
.eb-termin__status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--eb-ok); }
.eb-termin__status.is-full::before { background: var(--eb-focus); }
.eb-termin__status.is-closed::before { background: var(--eb-ink-3); }
/* Pfeil rückt beim Überfahren 3 px nach rechts (120 ms): zeigt, dass die ganze Zeile klickbar ist. */
.eb-termin__arrow { grid-column: 4; grid-row: 1; align-self: center; color: var(--eb-ink-3); transition: transform .12s var(--eb-ease), color .12s var(--eb-ease); }
.eb-termin a:hover .eb-termin__arrow, .eb-termin a:focus-visible .eb-termin__arrow { transform: translateX(3px); color: var(--eb-ink); }
.eb-empty { color: var(--eb-ink-2); }

/* Eigenständige Seite (Abmelden) */
.eb-page { max-width: 640px; margin: 0 auto; padding: clamp(32px, 6vw, 72px) clamp(16px, 5vw, 64px) 72px; box-sizing: content-box; }
.eb-page__title { font-family: var(--eb-font-display); font-size: clamp(2rem, 5vw, 3rem); line-height: 1.05; margin: 0 0 24px; text-wrap: balance; }
.eb-page__lead { font-size: 1.2rem; margin: 0 0 24px; color: var(--eb-ink-2); }
.eb-summary { border: 1px solid var(--eb-line); border-radius: var(--eb-radius-lg); padding: 24px; margin: 0 0 32px; background: var(--eb-paper-2); }
.eb-summary h2 { font-family: var(--eb-font-display); font-size: 1.4rem; margin: 0 0 6px; }
.eb-summary p { margin: 0 0 6px; color: var(--eb-ink-2); }
.eb-actions { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.eb-link { color: var(--eb-ink-2); text-decoration: underline; text-underline-offset: 4px; padding: 8px 0; align-self: flex-start; font-size: 1rem; }
.eb-link:hover { color: var(--eb-ink); }

/* Formularfelder untereinander auf allen Handys (auch große mit 430 bis 480 px). */
@media (max-width: 480px) {
	.eb-row, .eb-grid { grid-template-columns: minmax(0, 1fr); }
	.eb-item--half { grid-column: 1 / -1; }
	.eb-facts { font-size: 1rem; }
}
/* Terminliste: Vier Spalten erst ab Tablet-Breite, darunter Datum, Titel, Ort und Status untereinander. */
@media (max-width: 720px) {
	.eb-termin a { grid-template-columns: minmax(0, 1fr) 20px; gap: 4px 16px; }
	.eb-termin__date, .eb-termin__title, .eb-termin__place, .eb-termin__status { grid-column: 1; grid-row: auto; }
	.eb-termin__arrow { grid-column: 2; grid-row: 1 / span 4; }
}
@media (prefers-reduced-motion: reduce) {
	.eb-button, .eb-field input, .eb-termin a, .eb-item, .eb-pills label, .eb-termin__arrow { transition: none !important; }
}

/* Vorschau im Editor */
.eb-editor-hint { font: 500 12px/1.45 -apple-system, "Segoe UI", Roboto, sans-serif; color: #2271b1; margin: 0 0 14px; }
.eb-card--preview .eb-seg > label.is-on { background: var(--eb-ink); color: var(--eb-paper); }
.eb-card--preview .eb-legend { font-size: .9rem; font-weight: 500; margin-bottom: 6px; }
.eb-card--preview .eb-box { width: 20px; height: 20px; border: 1.5px solid var(--eb-ink-3); border-radius: 4px; flex: none; margin-top: 2px; }
.eb-card--preview .eb-button { cursor: text; }
.eb-card--preview .eb-item.is-conditional .eb-item__in { outline: 1.5px dashed var(--eb-line); outline-offset: -1px; border-radius: var(--eb-radius); padding: 10px 12px 0; margin: 0 0 12px; }
.eb-card--preview .eb-editor-hint--in { margin: 0 0 8px; }

/* ---------- Mehrere Schritte ----------
 * Bewegung (nicht mit Marvin abgestimmt, Nacht-Check 12.11.2026): der neue Schritt kommt 260 ms aus der Laufrichtung,
 * der Fortschritt füllt sich per scaleX in 400 ms. Kein Austritt, damit Weiter sofort reagiert. */
.eb-step__title { font-family: var(--eb-font-display); font-size: 1.2rem; font-weight: 700; line-height: 1.2; margin: 0 0 14px; outline: none; }
.eb-form:not(.is-steps) .eb-step + .eb-step { margin-top: 8px; padding-top: 20px; border-top: 1px solid var(--eb-line); }
.eb-form.is-steps .eb-step:not(.is-current) { display: none; }
.eb-form.is-steps.is-moving .eb-step.is-current { animation: eb-step-in .26s var(--eb-ease) both; }
@keyframes eb-step-in {
	from { opacity: 0; transform: translateX(calc(var(--eb-dir, 1) * 16px)); }
}
.eb-form.is-steps:not(.is-last) .eb-final { display: none; }
.eb-progress { margin: -4px 0 20px; }
.eb-progress__label { margin: 0 0 8px; font-size: .875rem; font-weight: 500; color: var(--eb-ink-2); font-variant-numeric: tabular-nums; }
.eb-progress__track { height: 4px; border-radius: 4px; background: var(--eb-line); overflow: hidden; }
.eb-progress__bar {
	display: block;
	height: 100%;
	background: var(--eb-focus);
	transform-origin: left center;
	transform: scaleX(var(--eb-progress, 0));
	transition: transform .4s var(--eb-ease);
}
.eb-stepnav { display: flex; gap: 10px; margin-top: 8px; }
.eb-stepnav .eb-button { flex: 1 1 0; }
.eb-form.is-first .eb-stepnav [data-eb-back] { display: none; }
.eb-form.is-last .eb-stepnav [data-eb-next] { display: none; }
.eb-form.is-last.is-first .eb-stepnav { display: none; }
/* Letzter Schritt: Zurück wird ein leiser Textknopf über der Einwilligung, der Absende-Knopf bleibt allein im Fokus. */
.eb-form.is-last .eb-stepnav { margin: 0 0 12px; }
.eb-form.is-last .eb-stepnav [data-eb-back] { flex: 0 0 auto; width: auto; padding: 8px 0; background: none; box-shadow: none; font-size: 1rem; font-weight: 500; color: var(--eb-ink-2); text-decoration: underline; text-underline-offset: 4px; }
.eb-form.is-last .eb-stepnav [data-eb-back]:hover { color: var(--eb-ink); }
.eb-button--ghost { background: transparent; color: var(--eb-ink); box-shadow: inset 0 0 0 1.5px var(--eb-ink); }
.eb-button--ghost:hover { background: var(--eb-accent-soft); color: var(--eb-ink); }

/* ---------- Absende-Knopf beim Senden ---------- */
.eb-submit.is-busy { pointer-events: none; background: var(--eb-ink-2); }
.eb-submit.is-busy::before {
	content: "";
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid currentColor;
	border-right-color: transparent;
	animation: eb-spin .8s linear infinite;
	flex: none;
}
@keyframes eb-spin { to { transform: rotate(360deg); } }

/* ---------- Erfolg: Haken zeichnet sich einmal ---------- */
.eb-card--done .eb-tick path { stroke-dasharray: 24; stroke-dashoffset: 24; animation: eb-draw .42s .12s var(--eb-ease) forwards; }
.eb-card--done .eb-tick { animation: eb-pop .32s var(--eb-ease) both; }
@keyframes eb-draw { to { stroke-dashoffset: 0; } }
@keyframes eb-pop { from { opacity: 0; transform: scale(.9); } }

@media (prefers-reduced-motion: reduce) {
	.eb-form.is-steps .eb-step.is-current, .eb-card--done .eb-tick { animation: none; }
	.eb-card--done .eb-tick path { animation: none; stroke-dashoffset: 0; }
	.eb-progress__bar { transition: none; }
	.eb-submit.is-busy::before { animation-duration: 2.4s; }
}
.eb-card--preview .eb-step-divider { margin: 6px 0 18px; border-top: 1.5px dashed var(--eb-ink-3); text-align: center; }
.eb-card--preview .eb-step-divider span { position: relative; top: -.75em; background: var(--eb-paper); padding: 0 10px; font: 500 12px/1.4 -apple-system, "Segoe UI", Roboto, sans-serif; color: #2271b1; }
