/* assets/css/form.css – Seminarverwaltung Stylesheet */

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

:root {
  --primary:    #004f74;
  --accent:     #006494;
  --font-family: 'Merriweather Sans', Arial, sans-serif;
  --blue:      var(--primary);
  --blue-light:#e6f2f7;
  --primary-hover: #1a6a8f; /* Code-Fallback; wird von theme_style_tag() pro Installation aus color_primary berechnet */
  --text:       #1a1a1a;
  --muted:      #5a5a5a;
  --hint:       #888;
  --border:     #ddd;
  --bg:         #f7f6f3;
  --white:      #ffffff;
  --red:        #c0392b;
  --amber:      #f9a825;
  --radius:     10px;
  --shadow:     0 1px 3px rgba(0,0,0,.08);
}

body {
  font-family: var(--font-family);
  font-size: 15px;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
}

/* Globaler Link-Reset: keine Standard-Unterstreichung, Markenfarbe statt Browser-Blau.
   Einzelne Bereiche (Fußzeile, AGB-Häkchen, Kartendetails) blenden die Unterstreichung
   gezielt beim Hover wieder ein. */
a { color: var(--primary); text-decoration: none; }

/* Header */
.site-header {
  background: var(--primary);
  padding: 0;
}
.header-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 18px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  position: relative;
  z-index: 1;
}
.header-title { display: flex; flex-direction: column; gap: 2px; }
.header-label {
  font-family: var(--font-family);
  font-size: 22px;
  font-weight: 400;
  color: #fff;
}
.header-logo { flex-shrink: 0; }
.header-logo-badge {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border-radius: 8px;
  padding: 6px 12px;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
}
.header-logo-badge img { display: block; max-height: 44px; max-width: 220px; width: auto; height: auto; }
.header-org-fallback {
  display: block;
  font-family: var(--font-family);
  font-size: 18px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
}

/* Main */
.page-main { padding: 32px 16px 48px; }
.container { max-width: 680px; margin: 0 auto; }

/* Cards */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px 28px;
  margin-bottom: 16px;
  box-shadow: var(--shadow);
}
.card-title {
  font-family: var(--font-family);
  font-size: 22px;
  font-weight: 600;
  color: var(--blue);
  margin-bottom: 10px;
  line-height: 1.3;
}
.event-hero-image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 320px;
  margin: 0 auto 18px;
  border-radius: 8px;
  object-fit: contain;
}
.event-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 14px;
  color: var(--muted);
  margin-bottom: 14px;
}
.event-meta a { color: var(--blue); }
.event-meta a:hover { text-decoration: underline; }
.card-section-title {
  /* Auf Kundenwunsch vom 31.08.2026 auffälliger gemacht (fetter + deutlicherer Rahmen/Linie) -
     betraf vorher als zu unauffällig empfundene Überschriften, sowohl die großen Karten-Titel
     ("Angaben zur Person" usw.) als auch die neuen thematischen Formular-Zwischenüberschriften
     (dieselbe CSS-Klasse, daher wirkt die Änderung einheitlich überall). */
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--primary);
}

/* Intro text (Seminarinhalt) - kann jetzt formatiertes HTML aus dem Rich-Text-Editor im
   Backend enthalten (fett, Listen, Absätze), daher Innenabstände für die möglichen
   verschachtelten Elemente. */
.intro-text {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.7;
  margin-bottom: 0;
}
.intro-text p { margin: 0 0 10px; }
.intro-text p:last-child { margin-bottom: 0; }
.intro-text ul, .intro-text ol { margin: 0 0 10px 20px; }
.intro-text ul:last-child, .intro-text ol:last-child { margin-bottom: 0; }

/* Progress */
.progress-wrap { margin-bottom: 24px; }
.progress-label {
  font-size: 12px;
  color: var(--hint);
  margin-bottom: 6px;
  display: flex;
  justify-content: space-between;
}
.progress-bar {
  height: 3px;
  background: var(--border);
  border-radius: 2px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: var(--blue);
  border-radius: 2px;
  transition: width .4s ease;
}

/* Form fields */
.field { margin-bottom: 18px; }
.field:last-child { margin-bottom: 0; }

label.field-label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 6px;
}
label.field-label .req { color: var(--red); margin-left: 2px; }

input[type=text], input[type=email], input[type=tel],
input[type=number], input[type=password], input[type=date],
input[type=datetime-local], select, textarea {
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  font-family: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--white);
  transition: border-color .15s;
  appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(0,79,116,.1);
}
textarea { min-height: 80px; resize: vertical; }
select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%23888' stroke-width='1.5' fill='none' stroke-linecap='round'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }

.field-hint { font-size: 12px; color: var(--hint); margin-top: 4px; }
.field-error { font-size: 12px; color: var(--red); margin-top: 4px; display: none; }
.field.has-error input, .field.has-error select, .field.has-error textarea { border-color: var(--red); }
.field.has-error .field-error { display: block; }

/* Grid */
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 480px) { .row-2 { grid-template-columns: 1fr; } }

/* Radio / Checkbox */
.choice-group { display: flex; flex-direction: column; gap: 8px; }
.choice-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-size: 14px;
  line-height: 1.4;
}
.choice-item:hover { border-color: var(--blue); background: var(--blue-light); }
.choice-item input[type=radio],
.choice-item input[type=checkbox] {
  width: auto;
  margin-top: 2px;
  accent-color: var(--blue);
  flex-shrink: 0;
}
.choice-item.selected { border-color: var(--blue); background: var(--blue-light); }

/* Branch logic */
.branch-section {
  border-left: 3px solid var(--blue);
  padding: 14px 18px;
  margin-top: 12px;
  background: var(--blue-light);
  border-radius: 0 8px 8px 0;
}
.branch-section-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 12px;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all .15s;
  text-decoration: none;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
/* Auf ausdrücklichen Wunsch: alle Buttons (primär UND sekundär) mit grünem Hintergrund und
   weißer Schrift, keine weiß/grau/rot gemischten Varianten mehr. */
.btn-secondary { background: var(--blue); color: #fff; border-color: var(--blue); }
.btn-secondary:hover { background: var(--primary-hover); border-color: var(--primary-hover); color: #fff; }
.btn-full { width: 100%; justify-content: center; padding: 13px; font-size: 15px; }

.form-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 8px;
}

/* AGB / Checkboxes */
.agb-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-bottom: 12px;
}
.agb-check input { margin-top: 2px; accent-color: var(--blue); flex-shrink: 0; }
.agb-check a { color: var(--blue); }
.agb-check a:hover { text-decoration: underline; }

/* Summary box */
/* .summary-box sitzt direkt auf dem <dl>-Element selbst (nicht auf einem Wrapper drumherum,
   siehe admin/detail.php) - die Grid-Deklaration muss deshalb auf .summary-box selbst stehen,
   nicht auf ".summary-box dl" (das würde ein <dl> ALS NACHFAHRE von .summary-box suchen, das es
   hier gar nicht gibt, und stillschweigend ins Leere laufen).
   Vorher float:left + fixe 140px-Breite fürs Label: bricht sichtbar, sobald ein Label (z.B.
   "Vor- und Nachname der Teilnehmer (einer pro Zeile)") auf 2 Zeilen umbricht - der zugehörige
   Wert (margin-left, kein clear) rutscht dann neben/über die zweite Zeile des Labels, das
   Ergebnis wirkt gequetscht/durcheinander (von Herbert am 31.08.2026 gemeldet). Grid statt
   Float behandelt beliebig lange, umbrechende Labels sauber - jedes dt/dd-Paar bleibt eine
   eigene Zeile, unabhängig davon wie viele Zeilen das Label braucht. */
.summary-box {
  display: grid;
  grid-template-columns: 160px 1fr;
  column-gap: 16px;
  row-gap: 10px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 14px 18px;
  font-size: 13px;
  margin-bottom: 20px;
}
.summary-box dt { color: var(--muted); font-weight: 400; }
.summary-box dd { font-weight: 500; margin: 0; white-space: pre-wrap; }
/* Zwischenüberschrift innerhalb der Zusammenfassung (Feldtyp 'heading', siehe admin/detail.php) -
   nimmt beide Spalten ein, dieselbe optische Sprache wie .card-section-title. */
.summary-box dt.summary-heading {
  grid-column: 1 / -1;
  font-size: 11px;
  font-weight: 700;
  color: var(--text);
  text-transform: uppercase;
  letter-spacing: .05em;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}
.summary-box dt.summary-heading:first-child { margin-top: 0; padding-top: 0; border-top: none; }

/* Alerts */
.alert {
  padding: 12px 16px;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.alert-success { background: var(--blue-light); color: var(--blue); border: 1px solid #7fbdd8; }
.alert-error   { background: #fdf2f2; color: var(--red); border: 1px solid #f5b7b1; }
.alert-warning { background: #fff8e1; color: #856404; border: 1px solid #ffe082; }
.alert-info    { background: #e8f4fd; color: #1565c0; border: 1px solid #90caf9; }

/* Closed banner */
.closed-banner {
  background: #fdf2f2;
  border: 1px solid #f5b7b1;
  border-radius: 10px;
  padding: 20px 24px;
  text-align: center;
}
.closed-banner h2 { color: var(--red); margin-bottom: 8px; font-size: 18px; }
.closed-banner p { color: var(--muted); font-size: 14px; }

/* Success page */
.success-page { text-align: center; padding: 40px 24px; }
.success-icon {
  width: 64px; height: 64px;
  background: var(--blue-light);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
}
.success-icon svg { color: var(--blue); }
.success-page h1 {
  font-family: var(--font-family);
  font-size: 24px;
  color: var(--blue);
  margin-bottom: 12px;
}
.success-page p { color: var(--muted); font-size: 15px; max-width: 480px; margin: 0 auto; line-height: 1.7; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 16px;
  font-size: 12px;
  color: var(--hint);
}
.site-footer .container {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.site-footer a { color: var(--hint); text-decoration: none; }
.site-footer a:hover { color: var(--blue); }

/* Admin-specific (shared) */
.admin-body { background: #f0efe9; }
.admin-nav {
  background: var(--blue);
  padding: 0;
  display: flex;
  align-items: center;
}
.admin-nav .nav-brand {
  display: flex;
  align-items: center;
  padding: 10px 24px;
  color: #fff;
  font-weight: 500;
  font-size: 15px;
  text-decoration: none;
}
.admin-nav .nav-brand-logo {
  display: inline-flex;
  align-items: center;
  background: #fff;
  border-radius: 6px;
  padding: 4px 10px;
  box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.admin-nav .nav-brand-logo img { display: block; max-height: 30px; max-width: 160px; width: auto; height: auto; }
.admin-nav .nav-links {
  display: flex;
  flex: 1;
  gap: 4px;
  padding: 8px 8px;
}
.admin-nav .nav-links a {
  color: rgba(255,255,255,.8);
  text-decoration: none;
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 14px;
  transition: background .15s;
}
.admin-nav .nav-links a:hover,
.admin-nav .nav-links a.active { background: rgba(255,255,255,.2); color: #fff; }
.admin-nav .nav-right { margin-left: auto; padding-right: 16px; font-size: 13px; color: rgba(255,255,255,.7); }

.admin-main { padding: 28px 24px; max-width: 1100px; margin: 0 auto; }
.page-heading { font-family: var(--font-family); font-size: 24px; font-weight: 600; margin-bottom: 20px; color: var(--text); }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--white); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.data-table th { background: var(--bg); font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); padding: 10px 14px; text-align: left; border-bottom: 1px solid var(--border); }
.data-table td { padding: 11px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--bg); }

/* Aktions-Buttons in Tabellenzeilen (z.B. Dashboard) – bleiben in einer Zeile */
.table-scroll { overflow-x: auto; }
.actions-row { display: flex; flex-wrap: nowrap; gap: 6px; }
.actions-row .btn { padding: 5px 10px; font-size: 12px; white-space: nowrap; }
.actions-row form { display: inline-flex; }

/* Badges */
.badge { display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 11px; font-weight: 500; }
.badge-pending   { background: #fff8e1; color: #856404; }
.badge-confirmed { background: var(--blue-light); color: var(--blue); }
.badge-waitlist  { background: #e8f4fd; color: #1565c0; }
.badge-cancelled { background: #fdf2f2; color: var(--red); }
.badge-declined  { background: #fdf0e6; color: #b3541e; }
.badge-inactive  { background: #f0f0f0; color: #777; }

/* Stat cards */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px,1fr)); gap: 12px; margin-bottom: 24px; }
.stat-card { background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; }
.stat-card .stat-label { font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.stat-card .stat-value { font-size: 28px; font-weight: 500; color: var(--text); }

/* Öffentliche Veranstaltungsübersicht (uebersicht.php) */
.overview-list { display: flex; flex-direction: column; gap: 12px; }
.overview-item {
  display: flex;
  gap: 18px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  text-decoration: none;
  color: inherit;
  transition: border-color .15s, box-shadow .15s;
}
.overview-item:hover { border-color: var(--blue); box-shadow: 0 2px 10px rgba(0,79,116,.1); }
.overview-date {
  flex-shrink: 0;
  width: 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--blue);
}
.overview-date-day { font-family: var(--font-family); font-size: 28px; font-weight: 600; line-height: 1; }
.overview-date-month { font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-top: 2px; }
.overview-date-year { font-size: 11px; color: var(--hint); margin-top: 1px; }
.overview-content { flex: 1; min-width: 0; }
.overview-title { font-family: var(--font-family); font-size: 18px; font-weight: 600; color: var(--blue); margin-bottom: 4px; }
.overview-loc { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.overview-excerpt { font-size: 14px; color: var(--text); line-height: 1.6; margin-bottom: 6px; }
.overview-price { font-size: 13px; font-weight: 500; color: var(--blue); }
.overview-thumb { flex-shrink: 0; width: 140px; height: 100px; border-radius: 8px; overflow: hidden; }
.overview-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 640px) {
  .overview-item { flex-wrap: wrap; }
  .overview-thumb { width: 100%; height: 160px; order: -1; }
  .overview-date { flex-direction: row; gap: 6px; width: auto; }
}

/* Agentur-Fußleiste: Produkt-Chip, Copyright, Version, Impressum/Datenschutz von Euro-tronic.
   Der innere Container ist auf die gleiche Breite/Ausrichtung wie .header-inner/.container
   begrenzt, damit Chip und Copyright bündig mit dem restlichen Seiteninhalt abschließen. */
.vendor-footer {
  background: var(--primary);
  color: rgba(255,255,255,.85);
  font-size: 13px;
}
.vendor-footer-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 10px 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
}
.vendor-footer .vendor-chip {
  /* Gleicher Rahmen/gleiche Rundung wie das Kunden-Logo-Badge im Header (.header-logo-badge,
     .admin-nav .nav-brand-logo) - vorher war der Chip komplett rund (Pille), das Logo-Badge
     dagegen eine leicht abgerundete Box, was auf derselben Seite uneinheitlich aussah. */
  background: #fff;
  color: #1a1a1a;
  font-weight: 600;
  border-radius: 8px;
  box-shadow: 0 1px 4px rgba(0,0,0,.15);
  padding: 6px 14px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.vendor-footer .vendor-footer-right a { color: rgba(255,255,255,.95); text-decoration: underline; }
.vendor-footer .vendor-footer-right a:hover { color: #fff; }

/* Im Adminbereich linksbündig statt zentriert/verteilt anordnen, und auf die breitere
   .admin-main-Spalte (1100px) statt die schmale Formular-Spalte (720px) abstimmen. */
.admin-body .vendor-footer-inner {
  /* Kein max-width/margin:auto (das würde den Block wie .admin-main auf einem breiten Bildschirm
     mittig mit Leerraum links UND rechts zentrieren) - stattdessen bündig am linken Rand, mit
     demselben Padding wie .nav-brand, damit es optisch mit dem Logo oben links abschließt. */
  max-width: none;
  margin: 0;
  padding-left: 24px;
  padding-right: 24px;
  justify-content: flex-start;
  gap: 24px;
}

/* Rollen-Badges (Benutzerverwaltung) */
.badge-role-admin      { background: var(--blue-light); color: var(--blue); }
.badge-role-verwaltung { background: #fff8e1; color: #856404; }
.badge-role-info       { background: #f0f0f0; color: #555; }
