/*
 * cx-v1.css – Stile, die das Backend über den Slot kopf auf jeder Seite einbindet (KONZEPT 5.4),
 * Version v1 (inhalte/gemeinsam/cx/cx-v1.css, gepinnt über event.json → gemeinsam.cx).
 *
 * Inhalt: Honeypot (.cx-hp), Vorschau-Banner des Slots start (.cx-vorschau), Meldungen und
 * Aufbau der Bausteine absage-v1 und bestaetigen-v1 (.cx-event, .cx-meldung, .cx-aktion …),
 * mehrzeilige Texte (.cx-mehrzeilig).
 *
 * Diese Datei steht im Kopf NACH dem CSS der Seite. Damit eine Seite trotzdem alles
 * überschreiben kann, sind die Selektoren der Bausteine in :where() gesetzt (Spezifität 0; bei
 * Absätzen p:where(…), Spezifität wie p in basis-v1.css, damit die Grundfarbe für p nicht greift).
 * Voraussetzung: tokens-v1.css (Farben nur aus den Tokens, Prüfregel C04).
 * Nur anhängen: Diese Datei wird nie geändert, eine Änderung ergibt cx-v2.css (KONZEPT 9.6).
 */

/* Honeypot bx_website – für Menschen unsichtbar, muss leer bleiben (KONZEPT 6.3) */
.cx-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

/* Mehrzeilige Texte aus event.json bzw. der Verwaltung: Zeilenumbrüche zeigen */
:where(.cx-mehrzeilig) { white-space: pre-line; }

/* ============================================================
   VORSCHAU-BANNER (Slot start, nur mit gültigem Vorschau-Link; Markup setzt das Backend):
   <div class="cx-vorschau" role="status">
     <p class="cx-vorschau__titel"><strong>Vorschau</strong> Nicht öffentlich. Zustand: offen</p>
     <ul class="cx-vorschau__zustaende">
       <li><a href="?vorschau=…&amp;cx-zustand=offen" aria-current="true">offen</a></li> …
     </ul>
   </div>
   ============================================================ */
.cx-vorschau {
  --focus: var(--apple);   /* Fokusrahmen auf Anthrazit sichtbar (Marine aus basis-v1.css wäre es nicht) */
  position: fixed; left: 16px; bottom: 16px; z-index: 300;
  max-width: min(560px, calc(100% - 32px));
  padding: 12px 16px; border-radius: 12px;
  background: var(--anthrazit); color: var(--white);
  box-shadow: var(--shadow-lg);
  font-family: var(--font-body); font-size: 0.8rem; line-height: 1.5;
}
.cx-vorschau__titel { margin: 0; color: var(--white); font-size: 0.8rem; line-height: 1.5; }
.cx-vorschau__titel strong {
  display: inline-block; margin-right: 8px; padding: 0 8px; border-radius: 999px;
  background: var(--apple); color: var(--marine); font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.7rem;
}
.cx-vorschau__zustaende { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; padding: 0; }
.cx-vorschau__zustaende a {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 999px;
  border: 1px solid var(--anthrazit-40); color: var(--white); text-decoration: none; font-size: 0.75rem;
}
.cx-vorschau__zustaende a:hover,
.cx-vorschau__zustaende a[aria-current="true"] { background: var(--white); color: var(--anthrazit); border-color: var(--white); }

/* ============================================================
   BAUSTEINE absage-v1 und bestaetigen-v1 (Slot inhalt der Systemseiten)
   ============================================================ */
:where(.cx-event) {
  margin: 0 0 24px; padding: 20px 24px; border-radius: 14px;
  background: var(--marine-05); border: 1px solid var(--marine-10);
}
p:where(.cx-event__titel) {
  font-family: var(--font-h); font-weight: 700; font-size: 1.15rem; line-height: 1.3;
  color: var(--marine); margin: 0 0 10px;
}
:where(.cx-event__fakten) { list-style: none; display: grid; gap: 6px; margin: 0; padding: 0; }
:where(.cx-event__fakten li) {
  display: flex; gap: 12px; align-items: flex-start;
  font-size: 0.95rem; line-height: 1.55; color: var(--anthrazit);
}
:where(.cx-event__fakten .bxfr) { flex: none; width: 20px; margin-top: 3px; color: var(--marine); }

p:where(.cx-text) { color: var(--anthrazit); }
:where(.cx-text + .cx-adresse, .cx-meldung + .cx-text) { margin-top: 12px; }
p:where(.cx-adresse) { font-size: 0.95rem; color: var(--anthrazit-70); }
:where(.cx-adresse strong) { font-weight: 600; color: var(--marine); overflow-wrap: anywhere; }

:where(.cx-angaben) {
  display: grid; gap: 6px 24px; margin: 20px 0 0; padding: 16px 20px; border-radius: 12px;
  background: var(--white); border: 1px solid var(--marine-20);
}
:where(.cx-angaben__zeile) { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 4px 16px; }
:where(.cx-angaben dt) { font-size: 0.85rem; font-weight: 600; color: var(--anthrazit-70); }
:where(.cx-angaben dd) { margin: 0; font-size: 0.95rem; color: var(--anthrazit); overflow-wrap: anywhere; }

:where(.cx-aktion) { margin: 28px 0 0; }
p:where(.cx-status) { margin: 0 0 12px; font-size: 0.88rem; font-weight: 600; color: var(--danger); }
p:where(.cx-status:empty) { display: none; }

p:where(.cx-meldung) {
  padding: 14px 18px; border-radius: 12px;
  background: var(--marine-05); border-left: 4px solid var(--marine);
  font-weight: 600; color: var(--marine);
}
p:where(.cx-meldung--erfolg) { background: var(--apple-20); border-left-color: var(--apple); }
p:where(.cx-weiter) { margin-top: 28px; }
p:where(.cx-kontakt) { margin-top: 24px; font-size: 0.9rem; color: var(--anthrazit-70); }

@media (max-width: 640px) {
  :where(.cx-angaben__zeile) { grid-template-columns: 1fr; gap: 0; }
  :where(.cx-aktion .btn, .cx-weiter .btn) { width: 100%; }
}
