/* =====================================================================
   public-base.css — App-Defaults: Seiten-Geruest & Typografie
   =====================================================================
   Gemeinsame Basis fuer ALLE oeffentlichen Seiten (form.php, index.php,
   impressum.php, datenschutz.php). Geladen als ERSTES, danach:
   css/public-form.css, css/public-pages.css und anschliessend die
   pro-Event <style>-Bloecke (form_width, page_css, form_css).

   Alle Selektoren nutzen :where() = Spezifitaet 0. Dadurch kann jedes
   Event-CSS (das im <head> NACH diesen Dateien steht) mit normalen
   Selektoren gewinnen, ohne !important zu brauchen.
   ===================================================================== */

:where(body) {
  font-family: Arial, Helvetica, sans-serif;
  /* Basis wie im WYSIWYG-Editor (15px/1.6): damit die im Editor
     gewaehlten Schriftgroessen auf der Seite identisch wirken. */
  font-size: 15px;
  line-height: 1.6;
  margin: 20px;
  background-color: #f9f9f9;
  color: #333;
}

:where(h1) { color: #0072CE; text-align: center; }
:where(h2) { color: #444; text-align: center; }

/* Bilder responsiv halten (wichtig fuer Image-Maps mit imageMapResizer).
   max-width:100% ueberschreibt sowohl style="width:..px" als auch width=".."
   Attribute. height:auto stellt das Seitenverhaeltnis wieder her. */
:where(.form-section img),
:where(body > img),
:where(body > div > img) {
  max-width: 100% !important;
  height: auto !important;
}

:where(.form-section) {
  max-width: 800px;
  margin: 0 auto;
  background: white;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 8px;
  box-shadow: 0px 4px 6px rgba(0, 0, 0, 0.1);
}
/* Kein zusaetzlicher Aussenabstand des ersten Elements (z.B. Ueberschrift)
   innerhalb der Karte — sonst entsteht ueber dem Formularkopf ein
   unnoetig grosser Leerraum zum oberen Kartenrand. */
:where(.form-section) > :first-child {
  margin-top: 0;
}

:where(.note) {
  font-size: 0.9em;
  color: #555;
  text-align: center;
  margin-top: 20px;
}

:where(.footer) {
  margin-top: 10px;
  padding: 15px;
  background-color: #ffffff;
}

:where(.legal-links) {
  text-align: center;
  font-size: 0.8em;
  margin-top: 8px;
  color: #999;
}
:where(.legal-links a) {
  color: #999;
  text-decoration: underline;
}

/* Zurueck-Link oben auf den Rechts-Seiten (Datenschutz/Impressum). */
:where(.legal-back) {
  margin: 0 0 14px 0;
  font-size: 0.9em;
}
:where(.legal-back a) {
  display: inline-block;
  padding: 7px 16px;
  background-color: #0072CE;
  color: #ffffff;
  border-radius: 4px;
  text-decoration: none;
}
:where(.legal-back a:hover) { background-color: #0059a8; }

/* Logo / Bild. */
:where(.logo-container) {
  display: flex;
  justify-content: space-between;
  margin-top: 20px;
}
:where(.logo-container img) { max-height: 70px; }

:where(.title) { font-weight: 600; color: #0072CE; }

/* ===================== Sprach-Umschalter (oeffentliche Seiten) ===================== */
.lang-switch-public {
  position: fixed;
  top: 10px;
  right: 12px;
  z-index: 9999;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid #ccc;
  border-radius: 6px;
  padding: 3px 8px;
  font-size: 13px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}
.lang-switch-public a { color: #0072CE; text-decoration: none; font-weight: 600; padding: 2px 4px; }
.lang-switch-public a.active { color: #222; text-decoration: underline; }
.lang-switch-public .lang-sep { color: #999; }

/* Schriftbild der WYSIWYG-Inhalte (Kopf/Kontent/Seiten) an den Editor
   angleichen: ueberschriften mit klarem, editor-aequivalentem Staffelungs-
   mass; Absatzabstand wie im Editor. */
:where(.form-section h1),
:where(.event-page-content h1) { font-size: 2em;    line-height: 1.3; margin: 0.67em 0; }
:where(.form-section h2),
:where(.event-page-content h2) { font-size: 1.5em;  line-height: 1.35; margin: 0.75em 0; }
:where(.form-section h3),
:where(.event-page-content h3) { font-size: 1.17em; line-height: 1.4;  margin: 0.83em 0; }
:where(.form-section h4),
:where(.event-page-content h4) { font-size: 1em;     line-height: 1.5;  margin: 1em 0; }
:where(.form-section p),
:where(.event-page-content p)  { margin: 0 0 0.75em 0; }
:where(.form-section ul),
:where(.form-section ol),
:where(.event-page-content ul),
:where(.event-page-content ol) { margin: 0 0 0.75em 0; padding-left: 1.8em; }
