/* ────────────────────────────────────────────────────────────────────
   LED-Banner in the site header — stadium "Werbebande" look.
   The .ticker sits between .nav-logo and .nav-menu (see _Layout.cshtml).
   ──────────────────────────────────────────────────────────────────── */

.ticker {
  flex: 1 1 auto;
  min-width: 0;             /* allow shrinking inside the flex nav */
  margin: 0 22px;
  height: 36px;
  background: #050505;
  border: 1px solid #1a1a1a;
  border-radius: 6px;
  position: relative;
  overflow: hidden;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,0.04),
    inset 0 0 18px rgba(0,0,0,0.85),
    0 1px 0 rgba(255,255,255,0.04);
}

/* Pixel mask — every 4px a tiny darker "gap" between LEDs. Sits on top of
   the scrolling text so the message reads like a real LED matrix.
   Kept subtle (low opacity) so it textures the panel without muddying the
   actual letters. */
.ticker::after {
  content: "";
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle, rgba(0,0,0,0.45) 0.8px, transparent 1px);
  background-size: 4px 4px;
  background-position: 0 0;
  pointer-events: none;
  mix-blend-mode: multiply;
  opacity: 0.30;
}

/* Subtle horizontal scanline + outer vignette for depth. */
.ticker::before {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg,
      rgba(255,255,255,0.05) 0%,
      transparent 25%,
      transparent 70%,
      rgba(0,0,0,0.40) 100%);
  pointer-events: none;
}

/* JS sets transform + transition every cycle — no CSS animation here. The
   track holds the messages exactly once, starts at the container's right
   edge and travels all the way to "fully off-screen left", then restarts.
   See the script in _TickerBanner.cshtml for the timing math. */
.ticker-track {
  display: flex; align-items: center;
  height: 100%;
  width: max-content;
  white-space: nowrap;
  gap: 38px;
  will-change: transform;
}

.ticker-msg {
  /* Cleaner sans-serif over Courier — easier to scan while moving. The site
     font 'Outfit' is already loaded for the rest of the page. */
  font-family: 'Outfit', 'Segoe UI', system-ui, sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ff3030;
  /* Just a hint of glow plus a thin dark backing for crispness on the
     bright LED colours. The earlier 4/10/18 px shadow stack made the
     letters wash out. */
  text-shadow:
    0 0 1px currentColor,
    0 1px 0 rgba(0,0,0,0.55);
  flex-shrink: 0;
}
.ticker-sep {
  color: rgba(255,255,255,0.18);
  font-size: 10px;
  flex-shrink: 0;
}

/* Hover pause is handled by freezing the transition; keeping the rule out
   of CSS-only land so the JS-driven animation stays in control. */

/* Admin preview reuses .ticker, but should keep a fixed visible width. */
.ticker-preview {
  flex: none;
  margin: 0;
  width: 100%;
  max-width: 720px;
}

/* ────────────────────────────────────────────────────────────────────
   Sponsor- / Ticker-Admin Edit-Form (modernes Card-Layout)
   ──────────────────────────────────────────────────────────────────── */

/* Live-Vorschau-Block oben auf der Ticker-Edit-Seite (dunkler Stadion-Look). */
.ticker-edit-preview {
  margin: 28px 0 24px;
  padding: 18px 20px;
  background: var(--dark);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 12px;
  display: flex; flex-direction: column; gap: 12px;
}
.ticker-edit-preview-label {
  font-size: 11px; font-weight: 700; letter-spacing: 0.20em;
  color: var(--blue-bright); text-transform: uppercase;
}
.ticker-edit-preview .ticker { flex: none; margin: 0; width: 100%; }

/* Weißes Formular, in gleichmäßige Blöcke aufgeteilt. */
.ticker-edit-form {
  background: #fff; color: var(--text);
  padding: 28px;
  border-radius: 12px;
  display: flex; flex-direction: column; gap: 22px;
}
.ticker-edit-form .form-block { display: flex; flex-direction: column; gap: 8px; }
.ticker-edit-form .form-label {
  font-size: 12px; font-weight: 700; letter-spacing: 0.10em;
  color: var(--text); text-transform: uppercase;
}
.ticker-edit-form .form-sublabel {
  font-size: 11px; font-weight: 600; letter-spacing: 0.06em;
  color: var(--muted); text-transform: uppercase; display: block; margin-bottom: 4px;
}
.ticker-edit-form input[type="text"],
.ticker-edit-form input[type="email"],
.ticker-edit-form input[type="password"],
.ticker-edit-form input[type="number"],
.ticker-edit-form input[type="date"] {
  width: 100%; box-sizing: border-box;
  padding: 11px 13px; font: inherit;
  border: 1px solid var(--border-light); border-radius: 6px;
  background: #fff; color: var(--text);
}
.ticker-edit-form input:focus {
  outline: none; border-color: var(--blue-bright);
  box-shadow: 0 0 0 3px rgba(37,99,212,0.15);
}
.ticker-edit-form .form-grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
  align-items: start;
}
/* Wrap-divs in form-grid-2 sind Flex-Spalten, damit die Inputs identisch
   tief und gleich hoch sitzen, egal ob darunter ein Hinweistext folgt. */
.ticker-edit-form .form-grid-2 > div {
  display: flex; flex-direction: column;
}
.ticker-edit-form .form-hint {
  font-size: 12px; color: var(--muted); margin: 4px 0 0;
}
.ticker-edit-form .form-toggle {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  background: #f4f6fa; border-radius: 8px;
  font-size: 14px; font-weight: 500; color: var(--text);
  cursor: pointer;
  align-self: end;
}
.ticker-edit-form .form-toggle input { width: auto; margin: 0; accent-color: var(--blue-bright); }
.ticker-edit-form .actions { justify-content: flex-end; }

@media (max-width: 560px) {
  .ticker-edit-form .form-grid-2 { grid-template-columns: 1fr; }
}

/* — Admin: 4 Standard-Farben als Chip-Auswahl — */
.color-choices {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 4px;
}
.color-choice {
  display: inline-flex; align-items: center; gap: 8px;
  cursor: pointer;
  padding: 8px 14px 8px 10px;
  background: #f4f6fa;
  border: 2px solid transparent;
  border-radius: 999px;
  font-size: 14px; font-weight: 600; color: var(--text);
  text-transform: none; letter-spacing: 0;
  transition: border-color .15s ease, background .15s ease;
}
.color-choice input[type="radio"] { position: absolute; opacity: 0; pointer-events: none; }
.color-choice .color-swatch {
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--swatch);
  box-shadow: inset 0 0 0 1px rgba(0,0,0,0.18), 0 0 6px var(--swatch);
  flex-shrink: 0;
}
.color-choice:hover { background: #ebeff5; }
.color-choice:has(input:checked) {
  border-color: var(--swatch);
  background: #fff;
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}

@media (max-width: 1100px) {
  .ticker { margin: 0 14px; }
  .ticker-msg { font-size: 14px; letter-spacing: 0.06em; }
}
@media (max-width: 768px) {
  .nav .ticker { display: none; }
}

/* — Admin: Mehrfach-Empfaenger als Chip-Eingabe (Mailserver-Einstellungen) —
   Adresse tippen + Enter/Komma druecken wird zur entfernbaren Pille; das
   eigentliche (verstecktes) Textfeld haelt weiterhin die komma-getrennte
   Liste fuer den normalen Formular-POST, siehe chip-field.js unten auf der Seite. */
.chip-field {
  display: flex; flex-wrap: wrap; gap: 6px;
  padding: 8px; min-height: 44px;
  border: 1px solid var(--border-light); border-radius: 8px;
  background: #fff;
}
.chip-field:focus-within { border-color: var(--blue-bright); box-shadow: 0 0 0 3px rgba(37,99,212,0.15); }
.chip-field-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: #eef2fb; color: var(--blue);
  padding: 5px 6px 5px 10px; border-radius: 999px; font-size: 13px;
}
.chip-field-pill.is-invalid { background: #fdeceb; color: #c0392b; }
.chip-field-pill button {
  border: none; background: none; cursor: pointer;
  font-size: 15px; line-height: 1; padding: 2px; color: inherit;
}
.chip-field-input {
  border: none; outline: none; flex: 1; min-width: 180px;
  font: inherit; padding: 5px 2px; color: var(--text);
}
