/* COOKIE Schulungstool: Grundlagen. Farben und Schrift wie in den Kursvideos (Petrol, Inter). */

@font-face {
  font-family: "Inter";
  src: url("../fonts/inter.66c6e4088364.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --petrol: #00738b;
  --petrol-strong: #005a6d;
  --petrol-mist: #e1f0f3;
  --petrol-line: #b8d8df;
  --ink: #0b2a31;
  --ink-soft: #4a6168;
  --line: #d5e1e4;
  --surface: #ffffff;
  --page: #f3f7f8;
  --danger: #b3261e;
  --danger-mist: #fbe9e7;
  --success: #1d7a4a;

  --font: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  --text-xs: .75rem;
  --text-sm: .875rem;
  --text-md: 1rem;
  --text-lg: 1.125rem;
  --text-xl: 1.375rem;
  --text-2xl: 1.75rem;
  --text-3xl: 2.25rem;
  --text-4xl: 3rem;

  --radius-s: 6px;
  --radius-m: 12px;
  --radius-l: 20px;
  --shadow: 0 1px 2px rgba(11, 42, 49, .06), 0 10px 28px rgba(11, 42, 49, .07);
  --gutter: clamp(16px, 4vw, 40px);
  --content: 1240px;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: var(--text-md);
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
  font-feature-settings: "cv11", "ss01";
}

body.area-learning { background: var(--page); }

img, svg, video { max-width: 100%; }

a { color: var(--petrol); text-underline-offset: .18em; }
a:hover { color: var(--petrol-strong); }

h1, h2, h3 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .5em; }
h1 { font-size: var(--text-2xl); font-weight: 750; }
h2 { font-size: var(--text-xl); font-weight: 700; }
h3 { font-size: var(--text-lg); font-weight: 650; }
p { margin: 0 0 1em; }

:focus-visible { outline: 3px solid var(--petrol); outline-offset: 2px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

.container { width: 100%; max-width: var(--content); margin: 0 auto; padding: 0 var(--gutter); }

/* Schaltflächen */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 44px; padding: .6em 1.15em;
  font: inherit; font-weight: 600; font-size: var(--text-md); line-height: 1.2;
  border: 1.5px solid transparent; border-radius: var(--radius-s);
  text-decoration: none; cursor: pointer; white-space: nowrap;
}
.btn-primary { background: var(--petrol); color: #fff; }
.btn-primary:hover { background: var(--petrol-strong); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--petrol); border-color: var(--petrol-line); }
.btn-secondary:hover { border-color: var(--petrol); color: var(--petrol-strong); }
.btn-quiet { background: transparent; color: var(--ink-soft); padding-left: .5em; padding-right: .5em; }
.btn-quiet:hover { color: var(--petrol); }
.btn-large { font-size: var(--text-lg); padding: .8em 1.4em; }
.btn svg { width: 1.1em; height: 1.1em; flex: none; }

/* Kopfzeile */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: var(--surface); border-bottom: 1px solid var(--line);
}
.topbar-inner {
  display: flex; align-items: center; gap: 16px; min-height: 64px;
}
.logo { display: inline-flex; align-items: center; flex: none; }
.logo img { height: 28px; width: auto; display: block; }
.topbar-course {
  font-weight: 650; color: var(--ink); text-decoration: none; font-size: var(--text-sm);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0;
}
.topbar-spacer { flex: 1; }
.account { display: flex; align-items: center; gap: 4px; }
.account form { margin: 0; }

/* Meldungen: ganze Box mit Fläche und Rahmen */
.messages { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 8px; }
.msg {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border: 1px solid var(--petrol-line); border-radius: var(--radius-m);
  background: var(--petrol-mist); font-size: var(--text-sm);
}
.msg::before {
  content: "i"; flex: none; display: grid; place-items: center;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--petrol); color: #fff; font-weight: 700; font-size: var(--text-xs);
}
.msg-success::before { content: "✓"; }
.msg-error { background: var(--danger-mist); border-color: #f1b8b2; }
.msg-error::before { content: "!"; background: var(--danger); }

/* Fußzeile */
.footer {
  border-top: 1px solid var(--line); background: var(--surface);
  color: var(--ink-soft); font-size: var(--text-sm); padding: 28px 0 36px; margin-top: 64px;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 12px 28px; align-items: center; }
.footer nav { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.footer a { color: var(--ink-soft); }
.footer a:hover { color: var(--petrol); }
.footer-note { flex-basis: 100%; margin: 0; font-size: var(--text-xs); }

/* Formulare */
label { font-weight: 600; font-size: var(--text-sm); }
input[type="email"], input[type="text"], input[type="password"], input[type="search"],
select, textarea {
  width: 100%; min-height: 44px; padding: .55em .8em;
  font: inherit; color: var(--ink); background: var(--surface);
  border: 1.5px solid var(--line); border-radius: var(--radius-s);
}
input:focus, select:focus, textarea:focus { border-color: var(--petrol); outline: none; box-shadow: 0 0 0 3px var(--petrol-mist); }
.field { display: grid; gap: 6px; margin-bottom: 16px; }
.field-check { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 14px; font-size: var(--text-sm); }
.field-check input { width: 20px; height: 20px; margin: 2px 0 0; flex: none; accent-color: var(--petrol); }
.field-check label { font-weight: 400; }
.errorlist { list-style: none; padding: 0; margin: 0; color: var(--danger); font-size: var(--text-sm); }
.helptext { color: var(--ink-soft); font-size: var(--text-xs); }

/* Anmeldung und schmale Seiten */
.auth-page { min-height: 100vh; display: grid; place-items: center; padding: 32px var(--gutter); background: var(--page); }
.auth-card {
  width: 100%; max-width: 440px; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius-l); padding: 32px clamp(20px, 5vw, 36px);
  box-shadow: var(--shadow);
}
.auth-head { margin-bottom: 24px; }
.auth-head img { height: 32px; width: auto; }
.auth-card h1 { font-size: var(--text-xl); margin-top: 20px; }
.auth-card p { color: var(--ink-soft); }
.auth-card form p { margin-bottom: 16px; }
.auth-card form p label { display: block; margin-bottom: 6px; }
.auth-card form button { width: 100%; }
.auth-links { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 18px; font-size: var(--text-sm); }
.auth-panel { margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--line); }
.auth-panel h2 { font-size: var(--text-lg); margin-bottom: 4px; }
.auth-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }

/* Statusanzeige einer Lektion */
.state {
  flex: none; width: 22px; height: 22px; border-radius: 50%;
  border: 2px solid var(--petrol-line); display: grid; place-items: center; background: var(--surface);
}
.state-started { border-color: var(--petrol); background: conic-gradient(var(--petrol) var(--p, 30%), var(--surface) 0); }
.state-done { border-color: var(--petrol); background: var(--petrol); }
.state-done::after {
  content: ""; width: 9px; height: 5px; border: solid #fff; border-width: 0 0 2px 2px;
  transform: translateY(-1px) rotate(-45deg);
}

/* Kursfortschritt als Kette der Lektionen, gruppiert nach Modulen */
.chain { display: flex; gap: 6px; align-items: stretch; margin: 12px 0 0; padding: 0; }
.chain-module { display: flex; gap: 2px; flex: var(--n, 1) 1 0; min-width: 0; }
.chain a {
  flex: 1 1 0; height: 12px; border-radius: 3px; background: var(--petrol-line); min-width: 4px;
}
.chain a.is-started { background: linear-gradient(90deg, var(--petrol) 50%, var(--petrol-line) 50%); }
.chain a.is-done { background: var(--petrol); }
.chain a:hover, .chain a:focus-visible { transform: scaleY(1.5); }
.chain a.is-current { outline: 2px solid var(--ink); outline-offset: 2px; }

/* Platz für Inhalte unter festen Höhen */
.stack > * + * { margin-top: 16px; }

/* Kasse, Testzahlung, Danke-Seite */
body.area-shop { background: var(--page); }
.topbar-simple { position: static; }
.shop-main { padding-top: 32px; padding-bottom: 32px; }
.shop-main.narrow { max-width: 720px; }
.shop-title { font-size: var(--text-2xl); margin-bottom: 20px; }
.checkout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 28px; align-items: start; }
.checkout-form, .checkout-summary, .shop-closed {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 24px clamp(18px, 4vw, 32px);
}
.checkout fieldset { border: 0; padding: 0; margin: 0 0 20px; min-width: 0; }
.checkout legend { font-weight: 700; font-size: var(--text-lg); margin-bottom: 14px; }
.checkout .field label { display: block; }
.has-error input, .has-error select { border-color: var(--danger); }
.bump-card {
  display: flex; gap: 14px; align-items: flex-start; cursor: pointer;
  border: 1.5px dashed var(--petrol); border-radius: var(--radius-m); background: var(--petrol-mist); padding: 16px;
}
.bump-card input { width: 22px; height: 22px; margin-top: 2px; flex: none; accent-color: var(--petrol); }
.bump-text { display: grid; gap: 4px; }
.bump-title { font-weight: 700; }
.bump-desc { color: var(--ink-soft); font-size: var(--text-sm); }
.checkout-submit { width: 100%; }
.checkout-note { color: var(--ink-soft); font-size: var(--text-sm); margin: 12px 0 0; }
.checkout-summary { position: sticky; top: 24px; }
.checkout-summary h2 { font-size: var(--text-lg); }
.summary-line { display: flex; justify-content: space-between; gap: 12px; font-size: var(--text-md); padding: 10px 0; border-bottom: 1px solid var(--line); }
.summary-phase { color: var(--petrol-strong); font-weight: 600; font-size: var(--text-sm); margin: 10px 0 0; }
.summary-points { margin: 16px 0; padding-left: 1.2em; display: grid; gap: 6px; font-size: var(--text-sm); }
.summary-tax { color: var(--ink-soft); font-size: var(--text-xs); margin: 0; }
.test-banner {
  border: 1px solid #f0c36d; background: #fff6e0; color: #6b4a00; border-radius: var(--radius-m);
  padding: 12px 16px; font-weight: 600; font-size: var(--text-sm); margin-bottom: 20px;
}
.test-items { list-style: none; padding: 0; margin: 0 0 12px; }
.test-items li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.order-facts { display: grid; gap: 10px; margin: 28px 0 0; padding: 18px 20px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); }
.order-facts div { display: grid; grid-template-columns: 9em minmax(0, 1fr); gap: 12px; }
.order-facts dt { color: var(--ink-soft); font-size: var(--text-sm); }
.order-facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 900px) {
  .checkout { grid-template-columns: minmax(0, 1fr); }
  .checkout-summary { position: static; order: -1; }
}
@media (max-width: 480px) {
  .order-facts div { grid-template-columns: minmax(0, 1fr); gap: 2px; }
}
.auth-hint { font-size: var(--text-sm); margin: 16px 0 0; }
.summary-line strong { white-space: nowrap; }

/* Rechtstexte */
.legal { max-width: 820px; }
.legal-text { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 28px clamp(18px, 4vw, 40px); }
.legal-text h1 { font-size: var(--text-2xl); hyphens: auto; overflow-wrap: break-word; }
@media (max-width: 480px) { .legal-text h1 { font-size: var(--text-xl); } }
.legal-text h2 { font-size: var(--text-lg); margin-top: 28px; }
.legal-text p, .legal-text li { max-width: 70ch; overflow-wrap: anywhere; }
.legal-text ul { padding-left: 1.2em; display: grid; gap: 4px; margin: 0 0 1em; }
.legal-stand { color: var(--ink-soft); margin-bottom: 12px; }
.legal-actions { margin-bottom: 8px; }
.legal-archive { margin-top: 20px; font-size: var(--text-sm); }
.legal-archive h2 { font-size: var(--text-md); }
@media print {
  .topbar, .footer, .legal-actions, .legal-archive { display: none; }
  .legal-text { border: 0; padding: 0; }
  body.area-shop { background: #fff; }
}
