/*
 * Basis-Styles, auf jeder Seite eingebunden. War bis vor Kurzem eine
 * PHP-Funktion (baseStyles()), die inline in jede Seite geschrieben wurde -
 * jetzt eine externe, statische Datei:
 *   1) kompatibel mit einer strikten Content-Security-Policy
 *      (style-src 'self', kein 'unsafe-inline' nötig)
 *   2) vom Browser aggressiv cachebar (siehe Cache-Control-Regeln für
 *      .css in der Apache-Konfiguration) - wird nicht mehr bei jedem
 *      Seitenaufruf neu übertragen.
 *
 * Farbpalette: bewusst Schwarz/Weiß/Grau (--accent, --ink, --paper, ...) -
 * einzige Ausnahme sind --danger/--success, die weiterhin farbig bleiben,
 * da Fehler-/Erfolgsmeldungen sich nicht nur auf Textinhalt verlassen
 * sollen (Barrierefreiheit).
 *
 * Schriften lokal eingebunden (keine externe Google-Fonts-Anfrage mehr).
 * Benötigte Dateien, siehe README Abschnitt "Assets und Schriften":
 *   /assets/fonts/ibm-plex-sans-400.woff2
 *   /assets/fonts/ibm-plex-sans-600.woff2
 *   /assets/fonts/ibm-plex-mono-500.woff2
 */

@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/assets/fonts/ibm-plex-sans-400.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Sans';
  src: url('/assets/fonts/ibm-plex-sans-600.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/assets/fonts/ibm-plex-mono-500.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #f4f4f4;
  --card: #ffffff;
  --ink: #111111;
  --ink-soft: #666666;
  --accent: #111111;
  --accent-hover: #333333;
  --line: #e0e0e0;
  --danger: #b23a34;
  --danger-bg: #fbeae8;
  --success: #2f6f4f;
  --success-bg: #e7f2ec;
  --focus: #111111;
  --cta: #0099cc;
  --cta-hover: #007ba3;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background-color: var(--paper);
  color: var(--ink);
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  min-height: 100vh;
  line-height: 1.5;
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 10px;
}
h1 {
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.7rem;
  font-weight: 600;
  letter-spacing: -.01em;
  margin: 0 0 22px;
  color: var(--ink);
}
h2.section-heading {
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0 0 14px;
  color: var(--ink);
}
.price-display {
  font-family: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  margin: 2px 0 24px;
  color: var(--ink);
}
.payment-buttons { display: flex; flex-direction: column; gap: 10px; margin-top: 4px; }
.payment-buttons .btn-primary { margin-top: 0; }
.buy-hint, .info-box {
  font-size: .85rem;
  color: var(--ink-soft);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 12px;
  margin: 0 0 22px;
}
.field { margin-bottom: 18px; }
label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  margin-bottom: 6px;
}
input[type="email"], input[type="password"], input[type="text"], select, textarea {
  width: 100%;
  padding: 11px 13px;
  font-size: .95rem;
  font-family: inherit;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 7px;
  transition: border-color .15s ease, background .15s ease;
}
textarea { resize: vertical; min-height: 100px; }
input:disabled {
  color: var(--ink-soft);
  background: var(--paper);
  cursor: default;
  opacity: 1;
}
input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px rgba(0,0,0,.12);
}
/* Kompakte Zeile: Währungs-Select + Übernehmen-Button nebeneinander,
   nicht die volle Breite wie ein normales Formularfeld. */
.currency-picker {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
}
.currency-picker select { width: auto; }
.currency-picker button {
  padding: 10px 16px;
  font-size: .88rem;
  font-family: inherit;
  font-weight: 600;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 7px;
  cursor: pointer;
}
.currency-picker button:hover { background: var(--card); }
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.hint { font-size: .78rem; color: var(--ink-soft); margin-top: 6px; }
.hint-mb-22 { margin-bottom: 22px; }
.hint-mt-20 { margin-top: 20px; }
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-bottom: 18px;
  font-size: .85rem;
  color: var(--ink);
}
.checkbox-field input { margin-top: 3px; }
.support-scope-hint { font-size: .82rem; color: var(--ink-soft); margin: 0 0 18px; }
button[type="submit"], .btn-primary {
  display: inline-block;
  width: 100%;
  padding: 12px 16px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 7px;
  cursor: pointer;
  margin-top: 6px;
  text-align: center;
  text-decoration: none;
  transition: background .15s ease;
}
button[type="submit"]:hover, .btn-primary:hover { background: var(--accent-hover); }
button[type="submit"]:focus-visible, .btn-primary:focus-visible { outline: none; box-shadow: 0 0 0 3px rgba(0,0,0,.3); }
button.btn-danger {
  width: 100%;
  padding: 12px 16px;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 600;
  color: #fff;
  background: var(--danger);
  border: none;
  border-radius: 7px;
  cursor: pointer;
  margin-top: 6px;
  transition: background .15s ease;
}
button.btn-danger:hover { background: #8f2d28; }
.form-error {
  font-size: .85rem;
  color: var(--danger);
  background: var(--danger-bg);
  border-radius: 7px;
  padding: 10px 13px;
  margin-bottom: 18px;
}
.form-error ul { margin: 0; padding-left: 18px; }
.success-box {
  font-size: .85rem;
  color: var(--success);
  background: var(--success-bg);
  border-radius: 7px;
  padding: 10px 13px;
  margin-bottom: 18px;
}
.switch-line {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-size: .88rem;
  color: var(--ink-soft);
  text-align: center;
}
.switch-line a { color: var(--cta); font-weight: 600; text-decoration: none; }
.switch-line a:hover { color: var(--cta-hover); text-decoration: underline; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
