/* ── Termin-Detailseite (/termin/<id>-<slug>) ──────────────────────────── */

.ev-back {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 500; color: var(--muted);
  text-decoration: none; margin-bottom: 14px;
}
.ev-back:hover { color: var(--brand); }
.ev-back svg { width: 15px; height: 15px; }

/* Titelbild: nie beschneiden — Flyer kommen hochkant wie quer.
   Der Rahmen legt sich per fit-content exakt ums Bild, dadurch entstehen
   auch bei ungewoehnlichen Seitenverhaeltnissen keine grauen Balken. */
.ev-hero {
  position: relative;
  width: fit-content; max-width: 100%;
  margin: 0 auto 20px;
  background: #f3f4f6;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
}
/* max-width statt width:100% — sonst entstehen bei Querformat-Flyern
   Balken links/rechts, sobald die Höhenbegrenzung greift. */
.ev-hero img {
  display: block; margin: 0 auto;
  max-width: 100%; max-height: 520px;
  width: auto; height: auto;
}
.ev-hero-zoom {
  position: absolute; right: 12px; bottom: 12px;
  display: inline-flex; align-items: center; gap: 5px;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(17,24,39,0.62); color: #fff;
  font-size: 11.5px; font-weight: 600;
  pointer-events: none;
}
.ev-hero-zoom svg { width: 12px; height: 12px; }

.ev-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 24px;
  align-items: start;
}

.ev-kind {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 8px;
}
.ev-kind-dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.ev-past-badge {
  background: #f3f4f6; color: var(--muted);
  padding: 2px 8px; border-radius: 999px;
  letter-spacing: 0.04em;
}

.ev-title {
  font-size: 30px; line-height: 1.2; margin: 0 0 18px;
  letter-spacing: -0.015em; color: var(--text);
  word-break: break-word;
}

.ev-facts {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px 20px;
  padding: 16px 18px; margin-bottom: 22px;
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius);
}
.ev-fact { display: flex; align-items: flex-start; gap: 10px; min-width: 0; }
.ev-fact svg { width: 17px; height: 17px; color: var(--brand); flex-shrink: 0; margin-top: 1px; }
.ev-fact-main { font-size: 14px; font-weight: 600; color: var(--text); word-break: break-word; }
.ev-fact-sub  { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.ev-fact-sub a { color: var(--brand); text-decoration: none; }
.ev-fact-sub a:hover { text-decoration: underline; }

.ev-rich {
  font-size: 15px; line-height: 1.65; color: var(--text);
  word-break: break-word;
}
.ev-rich > :first-child { margin-top: 0; }
.ev-rich > :last-child  { margin-bottom: 0; }
.ev-rich p { margin: 0 0 12px; }
.ev-rich ul, .ev-rich ol { margin: 0 0 12px; padding-left: 22px; }
.ev-rich li { margin: 3px 0; }
.ev-rich h1, .ev-rich h2, .ev-rich h3, .ev-rich h4 {
  font-size: 17px; margin: 22px 0 8px; line-height: 1.3;
}
.ev-rich a { color: var(--brand); }
.ev-rich blockquote {
  margin: 0 0 12px; padding: 8px 14px;
  border-left: 3px solid var(--border); color: var(--muted);
}
.ev-rich table { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-bottom: 12px; }
.ev-rich td, .ev-rich th { border: 1px solid var(--border); padding: 6px 9px; text-align: left; }

/* ── Seitenspalte ──────────────────────────────────────────────────────── */
.ev-side { display: flex; flex-direction: column; gap: 14px; position: sticky; top: 20px; }

.ev-card {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 16px 18px;
}
.ev-card-reg { border-color: #f3d0d6; box-shadow: var(--shadow-sm); }
.ev-card-head {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--muted);
  margin-bottom: 12px;
}

.ev-cap { margin-bottom: 12px; }
.ev-cap-bar {
  height: 6px; border-radius: 999px; background: #f1f2f4; overflow: hidden;
  margin-bottom: 6px;
}
.ev-cap-bar span { display: block; height: 100%; background: var(--brand); border-radius: 999px; }
.ev-cap-text { font-size: 12.5px; color: var(--muted); margin-bottom: 12px; }

.ev-note {
  background: #fef9e7; border: 1px solid #f5b800; border-radius: var(--radius-sm);
  padding: 10px 12px; font-size: 12.5px; color: var(--text);
  margin-bottom: 12px;
}
.ev-as { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.ev-as strong { display: block; color: var(--text); font-size: 14px; margin-top: 2px; }

.ev-card label {
  display: block; font-size: 12.5px; color: var(--muted);
  margin: 12px 0 4px;
}
.ev-card label span { color: var(--muted-2); }
.ev-card input[type="text"], .ev-card textarea {
  width: 100%; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 8px 10px; font: inherit; font-size: 13px; color: var(--text);
  background: #fff;
}
.ev-card textarea { min-height: 64px; resize: vertical; }
.ev-card input:focus, .ev-card textarea:focus {
  outline: none; border-color: var(--brand);
}

.ev-state {
  display: flex; align-items: flex-start; gap: 8px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 12.5px; line-height: 1.45; margin-bottom: 12px;
}
.ev-state svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.ev-state-ok    { background: #dcfce7; color: #14532d; }
.ev-state-bad   { background: #fee2e2; color: #991b1b; }
.ev-state-info  { background: #fdecef; color: #8f0c22; }
.ev-state-muted { background: #f3f4f6; color: var(--muted); }

.ev-error, .ev-ok {
  padding: 9px 11px; border-radius: var(--radius-sm);
  font-size: 12.5px; margin: 10px 0;
}
.ev-error { background: #fee2e2; color: #991b1b; }
.ev-ok    { background: #dcfce7; color: #14532d; }

.ev-hint { font-size: 11.5px; color: var(--muted); margin-top: 8px; line-height: 1.45; }

.ev-btn {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 11px 14px; border-radius: 10px;
  font: 600 13.5px/1 'Inter', sans-serif;
  border: 1px solid transparent; cursor: pointer; text-decoration: none;
  margin-top: 10px;
  transition: background .15s, border-color .15s, color .15s;
}
.ev-btn svg { width: 15px; height: 15px; }
.ev-btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.ev-btn-primary:hover { background: var(--brand-dark, #a10c25); border-color: var(--brand-dark, #a10c25); }
.ev-btn-primary:disabled { opacity: .55; cursor: wait; }
.ev-btn-secondary { background: #fff; border-color: var(--border); color: var(--text); }
.ev-btn-secondary:hover { border-color: var(--brand); color: var(--brand); }
.ev-btn-danger { background: #fee2e2; border-color: #fecaca; color: #991b1b; }
.ev-btn-danger:hover { background: #fecaca; }
.ev-btn-inline { width: auto; margin-top: 20px; }

.ev-share { display: flex; flex-direction: column; gap: 8px; }
.ev-share-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: #fff;
  font: 500 13px/1 'Inter', sans-serif; color: var(--text);
  cursor: pointer; text-decoration: none;
  transition: border-color .15s, color .15s;
}
.ev-share-btn:hover { border-color: var(--brand); color: var(--brand); }
.ev-share-btn svg { width: 15px; height: 15px; color: var(--muted); }
.ev-share-btn:hover svg { color: var(--brand); }
.ev-share-btn.is-done { border-color: #86efac; color: #14532d; }
.ev-share-btn.is-done svg { color: #16a34a; }

/* ── Lightbox ──────────────────────────────────────────────────────────── */
.ev-lightbox {
  position: fixed; inset: 0; z-index: 10050;
  background: rgba(15,23,42,0.88);
  display: flex; align-items: center; justify-content: center;
  padding: 32px 20px; cursor: zoom-out;
}
.ev-lightbox[hidden] { display: none !important; }
.ev-lightbox img {
  max-width: 100%; max-height: 100%; object-fit: contain;
  border-radius: 8px; box-shadow: 0 24px 70px rgba(0,0,0,0.45);
}
.ev-lightbox-close {
  position: absolute; top: 16px; right: 18px;
  width: 38px; height: 38px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  border: none; background: rgba(255,255,255,0.9); color: #111827;
  font-size: 19px; cursor: pointer; padding: 0;
}
.ev-lightbox-close:hover { background: #fff; }

/* ── Leerzustand (Termin nicht gefunden) ───────────────────────────────── */
.ev-empty {
  background: var(--card); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 44px 24px; text-align: center;
}
.ev-empty svg { width: 34px; height: 34px; color: var(--muted-2); }
.ev-empty h1 { font-size: 20px; margin: 12px 0 6px; }
.ev-empty p { font-size: 13.5px; color: var(--muted); margin: 0 0 18px; }
.ev-empty .ev-btn { width: auto; display: inline-flex; }

@media (max-width: 900px) {
  .ev-grid { grid-template-columns: 1fr; gap: 20px; }
  /* Anmeldung auf dem Handy zuerst — das ist die eigentliche Aktion. */
  .ev-side { position: static; order: -1; }
  .ev-title { font-size: 24px; }
  .ev-hero img { max-height: 340px; }
}
