/*
 * r26-termin.css — Buchungsseite /termin/ des Relaunch 2611 (SPEC-2611 2a).
 * Vorlage: design/source/Termin-v2.dc.html; alle Masse, Farben und Texte
 * wortgetreu aus dem Board, Inline-Styles als Klassen. Geladen nur auf dieser
 * Vorlage (Enqueue in r26-termin.php, laeuft hinter relaunch.css).
 * Handy nach SPEC 8.5: Ink-Einfuehrung auf h1 + eine Zeile ueber dem Formular,
 * Kalendertage als horizontales Laufband; Felder-Raster einspaltig (SPEC 8.2).
 * b6-fix (bld_fc36bbdc): h1 ohne Silbentrennung — hyphens manual auf der
 * ganzen Seite (hebt relaunch.css' hyphens:auto fuer .h1 unten auf), h1 44 px
 * unter 860 px statt 52 px, damit „Ihr Erstgespräch." nur zwischen Woertern
 * umbricht (QA-Befund b6 bei 390 px: „Erstge-/spräch."). Knopf .rl-term-reset
 * entfaellt (Board-Steuerung, kein Site-Teil). b7 (SPEC 1): die 44-px-Regel
 * ist abgeloest — relaunch.css setzt die h1 auf clamp(40px, 11.5vw, 52px),
 * global ohne Silbentrennung und ohne Wortbruch.
 */

/* ---------- Zweispalterei (Board: .split 0.82/1.18fr, min-height 900) ---------- */

body.ccc-rl .rl-term { display: grid; grid-template-columns: minmax( 0, .82fr ) minmax( 0, 1.18fr ); min-height: 900px; background: #ffffff; hyphens: manual; }

/* Links: Ink-Flaeche mit Wappen-Wasserzeichen (Board: rechts -80px, 520 px breit, Opazitaet .07). */
body.ccc-rl .rl-term-links { position: relative; overflow: hidden; min-height: 900px; }
body.ccc-rl .rl-term-wappen { position: absolute; right: -80px; top: 60px; width: 520px; height: auto; opacity: .07; pointer-events: none; }
body.ccc-rl .rl-term-links-innen { position: absolute; left: 48px; right: 48px; bottom: 56px; display: flex; flex-direction: column; gap: 18px; }

/* Hero-H1 skaliert mit der linken Spalte (bld_e82b9b72, live 1.12. bei 1024 px
 * wurde „Erstgespräch." rechts abgeschnitten). Die Spalte ist 41 % der Breite
 * minus 96 px Innenabstand, „Erstgespräch." misst rund 7,6 x Schriftgroesse:
 * 5.3vw - 13px haelt das Wort bei 1024 (41,3 px), 1280 (54,8 px) und 1366
 * (59,4 px) vollstaendig in der Spalte. Unter 861 px gilt der Handy-Clamp aus
 * relaunch.css (40/11.5vw/52), der bei 390 px passt. Kein Umbruch im Wort. */
@media ( min-width: 861px ) {
	body.ccc-rl .rl-term .h1 { font-size: clamp( 28px, calc( 5.3vw - 13px ), 60px ); }
}

body.ccc-rl .rl-term-versprechen { margin: 0; font-size: 18px; line-height: 1.55; color: #d4dde0; }
body.ccc-rl .rl-term-liste { display: flex; flex-direction: column; gap: 0; margin-top: 10px; border-top: 1px solid rgba( 246, 248, 248, .16 ); }
body.ccc-rl .rl-term-liste > div { padding: 14px 0; border-bottom: 1px solid rgba( 246, 248, 248, .16 ); font-size: 16px; color: #d4dde0; line-height: normal; }
body.ccc-rl .rl-term-liste > div:last-child { border-bottom: 0; }
body.ccc-rl .rl-term-plaetze { font-size: 15px; color: var( --signal ); font-weight: 600; line-height: normal; }

/* Rechts: weisser Ablauf (Board: padding 48/56/64, Spaltensaal 26). */
body.ccc-rl .rl-term-rechts { padding: 48px 56px 64px 56px; display: flex; flex-direction: column; gap: 26px; background: #ffffff; }
body.ccc-rl .rl-term-schritt { display: flex; flex-direction: column; gap: 26px; }
body.ccc-rl .rl-term-label { font-size: 13px; font-weight: 700; color: #4f6570; line-height: normal; }

/* ---------- Felder, Chips, Hinweise (Board: .lb/.in/.hint/.seg) ---------- */

body.ccc-rl .rl-term-felder { display: grid; grid-template-columns: minmax( 0, 1fr ) minmax( 0, 1fr ); gap: 18px; margin-top: -10px; }
body.ccc-rl .rl-term .lb { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; color: var( --ink ); line-height: normal; }
body.ccc-rl .rl-term .hint { font-weight: 400; font-size: 14px; color: #4f6570; }
body.ccc-rl .rl-term .in { border: 1px solid #9fb0b6; border-radius: 4px; padding: 14px; font-size: 16px; font-family: inherit; background: #ffffff; color: var( --ink ); box-sizing: border-box; width: 100%; }
body.ccc-rl .rl-term .in[aria-invalid="true"] { border-color: var( --flag ); }
body.ccc-rl .rl-term textarea.in { resize: vertical; }
body.ccc-rl .rl-term .rl-term-feld-fehler { font-weight: 500; font-size: 14px; line-height: normal; color: var( --flag ); }
body.ccc-rl .rl-term .rl-term-feld-fehler[hidden] { display: none; }
body.ccc-rl .rl-term-chips { display: flex; flex-wrap: wrap; gap: 8px; font-weight: 500; }
body.ccc-rl .rl-term-chip { border: 1px solid #9fb0b6; background: #ffffff; border-radius: 4px; padding: 11px 14px; font-family: inherit; font-size: 15px; color: var( --ink ); line-height: normal; min-height: 44px; cursor: pointer; box-sizing: border-box; }
body.ccc-rl .rl-term-chip[aria-pressed="true"] { border-color: var( --ink ); background: var( --ink ); color: #ffffff; }

/* ---------- Schlosszeile (Board: #e9eef0, 15 px/600, Schloss-SVG) ---------- */

body.ccc-rl .rl-term-schloss { display: flex; gap: 10px; align-items: center; padding: 14px 16px; background: #e9eef0; border-radius: 4px; font-size: 15px; font-weight: 600; line-height: normal; }
body.ccc-rl .rl-term-schloss svg { flex: none; }
body.ccc-rl .rl-term-schloss[hidden] { display: none; }

/* ---------- Kalender (Board: Spaltensaal 16, Kalkuel gesperrt bei .55/nicht klickbar) ---------- */

body.ccc-rl .rl-term-kalender { position: relative; }
body.ccc-rl .rl-term-kal-innen { display: flex; flex-direction: column; gap: 16px; }
body.ccc-rl .rl-term-kal-innen.verschlossen { opacity: .55; pointer-events: none; }
body.ccc-rl .rl-term-kal-innen[hidden] { display: none; }

body.ccc-rl .rl-term-next { display: flex; justify-content: space-between; align-items: center; gap: 16px; border: 1px solid var( --ink ); background: #ffffff; padding: 20px 22px; border-radius: 4px; font-family: inherit; color: var( --ink ); cursor: pointer; text-align: left; }
body.ccc-rl .rl-term-next-titel { font-size: 20px; font-weight: 700; line-height: normal; }
body.ccc-rl .rl-term-next-aktion { font-size: 15px; font-weight: 700; color: var( --signal-ink ); text-decoration: underline; line-height: normal; }

body.ccc-rl .rl-term-oder { font-size: 13px; font-weight: 700; color: #4f6570; margin-top: 8px; line-height: normal; }
body.ccc-rl .rl-term-tage { display: grid; grid-template-columns: repeat( 5, minmax( 0, 1fr ) ); gap: 10px; }
body.ccc-rl .rl-term-tage button { border-radius: 4px; padding: 16px 6px; font-family: inherit; font-size: 16px; font-weight: 700; line-height: normal; min-height: 52px; cursor: pointer; border: 1px solid #9fb0b6; background: #ffffff; color: var( --ink ); }
body.ccc-rl .rl-term-tage button[aria-pressed="true"] { border-color: var( --ink ); background: var( --ink ); color: #ffffff; }

body.ccc-rl .rl-term-zeiten { display: grid; grid-template-columns: repeat( 4, minmax( 0, 1fr ) ); gap: 10px; }
body.ccc-rl .rl-term-zeiten button { border: 1px solid #9fb0b6; background: #ffffff; color: var( --ink ); border-radius: 4px; padding: 14px 8px; font-family: inherit; font-size: 16px; line-height: normal; min-height: 48px; cursor: pointer; }
body.ccc-rl .rl-term-zeiten button:hover { border-color: var( --ink ); }

body.ccc-rl .rl-term-fusszeile { font-size: 14px; color: #4f6570; line-height: normal; }

/* Ersatzzeile, solange das Backend fehlt: gleiche Flaeche wie die Schlosszeile. */
body.ccc-rl .rl-term-fallback { display: flex; flex-direction: column; gap: 4px; padding: 14px 16px; background: #e9eef0; border-radius: 4px; font-size: 15px; font-weight: 600; line-height: normal; }
body.ccc-rl .rl-term-fallback[hidden] { display: none; }
body.ccc-rl .rl-term-fallback a { font-weight: 700; align-self: flex-start; min-height: 24px; }

/* Fehlerzeile (409 slot_belegt und sonstige Buchungsfehler). */
body.ccc-rl .rl-term-fehler { padding: 14px 16px; background: #fdf1ef; border: 1px solid #d9584a; border-radius: 4px; font-size: 15px; font-weight: 600; color: #7a1f15; line-height: normal; }
body.ccc-rl .rl-term-fehler[hidden] { display: none; }

/* Honigtopf: fuer Menschen unsichtbar, fuer Bots im Fluss. */
body.ccc-rl .rl-term-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* ---------- Schritt 3: Formular (Board: Formular-Saal 18) ---------- */

body.ccc-rl .rl-term-form { gap: 18px; }
body.ccc-rl .rl-term-form .rl-term-felder { margin-top: 0; }
body.ccc-rl .rl-term-slot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; border: 1px solid var( --ink ); border-radius: 4px; padding: 18px 20px; }
body.ccc-rl .rl-term-slot-text { font-weight: 800; font-size: 22px; line-height: normal; }
body.ccc-rl .rl-term-aendern { background: none; border: none; color: var( --signal-ink ); font-family: inherit; font-size: 15px; font-weight: 700; text-decoration: underline; line-height: normal; cursor: pointer; min-height: 44px; padding: 0; }

body.ccc-rl .rl-term-buchen { background: var( --signal ); color: var( --ink ); border: none; font-weight: 700; font-size: 18px; padding: 19px 26px; border-radius: 4px; font-family: inherit; line-height: normal; min-height: 56px; cursor: pointer; }
body.ccc-rl .rl-term-buchen:hover { background: #12b3cb; }
body.ccc-rl .rl-term-privacy { font-size: 14px; color: #4f6570; text-align: center; line-height: normal; }

/* ---------- Schritt 4: Bestaetigung ---------- */

body.ccc-rl .rl-term-fertig { gap: 18px; }
body.ccc-rl .rl-term-fertig-titel { font-size: 56px; font-weight: 850; letter-spacing: -0.035em; font-stretch: 112%; line-height: 1; }
body.ccc-rl .rl-term-fertig-slot { font-size: 18px; color: #2f4a54; line-height: normal; }
body.ccc-rl .rl-term-fertig-karte { display: flex; gap: 18px; align-items: center; border: 1px solid #c9d3d6; border-radius: 8px; padding: 22px; margin-top: 8px; }
body.ccc-rl .rl-term-fertig-innen { display: flex; flex-direction: column; gap: 6px; font-size: 15px; }
body.ccc-rl .rl-term-fertig-ruf { font-size: 17px; line-height: normal; }
body.ccc-rl .rl-term-caller { font-weight: 600; }
body.ccc-rl .rl-term-caller[hidden] { display: none; }
body.ccc-rl .rl-term-fertig-note { color: #4f6570; line-height: normal; }
body.ccc-rl .rl-term-fertig-links { display: flex; gap: 18px; margin-top: 4px; }
body.ccc-rl .rl-term-fertig-links a[hidden] { display: none; }

/* ---------- Sichtbarkeit der Zustaende ---------- */

body.ccc-rl .rl-term-schritt[hidden] { display: none; }

/* ---------- Handy (SPEC 8.5: Ink-Panel auf h1 + eine Zeile, Tage als Laufband; SPEC 8.2: Felder untereinander) ---------- */

@media ( max-width: 860px ) {

	body.ccc-rl .rl-term { grid-template-columns: minmax( 0, 1fr ); min-height: 0; }

	/* Ink-Einfuehrung: nur h1 + Versprechen ueber dem Formular; Wappen, Zeilen
	   und Plaetze-Notiz entfallen (SPEC 8.5). */
	body.ccc-rl .rl-term-links { min-height: 0; padding: 64px 20px 40px 20px; }
	body.ccc-rl .rl-term-wappen,
	body.ccc-rl .rl-term-liste,
	body.ccc-rl .rl-term-plaetze { display: none; }
	body.ccc-rl .rl-term-links-innen { position: static; left: auto; right: auto; bottom: auto; }

	/* b7 (SPEC 1): Die h1-Groesse uebernimmt relaunch.css unten mit
	   clamp(40px, 11.5vw, 52px) — bei 360 px sind das 41.4 px, und
	   „Erstgespräch." (314 px) passt in die 320-px-Spalte ohne Wortbruch;
	   die b6-Fix-Regel (44 px fest) ist damit abgeloest. */

	body.ccc-rl .rl-term-rechts { padding: 48px 20px 64px 20px; }

	/* Felder untereinander (SPEC 8.2, Board-Medienfrage fuer .split). */
	body.ccc-rl .rl-term-felder { grid-template-columns: minmax( 0, 1fr ); }

	/* Kalendertage: horizontales Laufband statt Raster (SPEC 8.5). */
	body.ccc-rl .rl-term-tage { display: flex; overflow-x: auto; gap: 10px; scroll-snap-type: x proximity; padding-bottom: 4px; -webkit-overflow-scrolling: touch; }
	body.ccc-rl .rl-term-tage button { flex: none; min-width: 104px; scroll-snap-align: start; }
}

/* ---------- CR-001 (Joerg 1.12.): linke Spalte passt sich dem Fenster an ----------
 * Vorher: Raster min-height 900 px, Text absolut am unteren Rand der Spalte.
 * Bei 1900x930 lag „Ihr Erstgespräch." deshalb unter dem ersten Bildschirm.
 * Jetzt: keine feste Mindesthoehe, der Text steht oben in der Spalte und
 * bleibt beim Scrollen kleben (sticky), Schrift und Abstaende folgen Breite
 * UND Hoehe des Fensters. Handy (<= 860 px) bleibt unveraendert. */
@media ( min-width: 861px ) {
	body.ccc-rl .rl-term { min-height: 0; }
	body.ccc-rl .rl-term-links { min-height: 0; }
	body.ccc-rl .rl-term-links-innen {
		position: sticky;
		top: 0;
		left: auto;
		right: auto;
		bottom: auto;
		padding: clamp( 28px, 6vh, 64px ) clamp( 28px, 3.5vw, 48px ) clamp( 28px, 5vh, 56px );
		gap: clamp( 10px, 1.8vh, 18px );
	}
	body.ccc-rl .rl-term .h1 { font-size: clamp( 28px, min( calc( 5.3vw - 13px ), 7.5vh ), 60px ); }
	body.ccc-rl .rl-term-versprechen { font-size: clamp( 16px, 2vh, 18px ); }
	body.ccc-rl .rl-term-liste > div { padding: clamp( 8px, 1.4vh, 14px ) 0; font-size: clamp( 14px, 1.8vh, 16px ); }
}
