/* ---------- decorative glass blobs behind the hero/panels ---------- */
.notif-blob-layer { position: relative; }
.notif-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  pointer-events: none;
  z-index: 0;
}
.notif-blob-1 { width: 420px; height: 420px; top: -160px; right: -120px; background: radial-gradient(circle, color-mix(in srgb, var(--accent-solid) 30%, transparent), transparent 70%); }
.notif-blob-2 { width: 360px; height: 360px; top: 260px; left: -140px; background: radial-gradient(circle, color-mix(in srgb, var(--sky) 22%, transparent), transparent 70%); }
/*
 * Hebt den Inhalt ueber die dekorativen Blobs. Das :not() ist
 * entscheidend: ohne es trifft "> *" auch die Blobs selbst, die
 * ebenfalls direkte Kinder sind. Da beide Regeln dieselbe Spezifitaet
 * haben (je eine Klasse, das * zaehlt null), gewann die spaetere - die
 * Blobs standen dadurch auf relative statt absolute, blieben im
 * Textfluss und schoben den Hero-Inhalt um ihre 420 + 360 px nach unten.
 */
.notif-blob-layer > *:not(.notif-blob) { position: relative; z-index: 1; }

/* ---------- plain (kachel-lose) Abschnitte ---------- */
.notif-plain-section {
  margin-top: 32px;
}
.notif-plain-section + .notif-plain-section {
  margin-top: 40px;
}

/* ---------- status row ---------- */
.notif-status-card {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 4px;
}
.notif-status-text { flex: 1; min-width: 0; margin: 0; display: flex; flex-direction: column; gap: 4px; }
.notif-status-title { font-size: 1.03rem; font-weight: 700; color: var(--ink); }

/* Eine Zeile je Meldungsart in Schritt 2 - gleicher Aufbau wie die
   Statuszeile in Schritt 1: Schalter links, Text rechts. */
.notif-type-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 0;
}
.notif-status-sub { display: block; font-size: 0.88rem; color: var(--muted); line-height: 1.5; }

/*
 * Der frühere seiteneigene Schalter (.notif-switch-track/-thumb, blau,
 * mit uppercase-Beschriftung "AKTIVIEREN") ist entfallen. Stattdessen
 * kommt derselbe rot/gruene Schalter zum Einsatz wie auf der Hinweise-
 * und der Kalenderseite - definiert in embedded/push/push-switch.css.
 * Hier bleibt nur die Positionierung innerhalb der Statuskarte.
 */
.notif-switch-btn {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  padding: 4px;
}

.notif-hint-line {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 18px 0 0;
  font-size: 0.85rem;
  color: var(--muted);
}
.notif-hint-line svg { width: 15px; height: 15px; flex-shrink: 0; opacity: 0.85; }

/* ---------- themen section ---------- */
.notif-section-hint { color: var(--muted); font-size: 0.95rem; margin: 10px 0 20px; line-height: 1.6; }

.notif-search-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 18px; }
.notif-search-field {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 240px;
  max-width: 300px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-hairline);
  border-radius: 999px;
  padding: 10px 16px;
  color: var(--muted);
}
.notif-search-field svg { width: 15px; height: 15px; flex-shrink: 0; }
.notif-search-field input {
  border: none; background: transparent; outline: none; color: var(--ink);
  font-size: 0.92rem; flex: 1; font-family: inherit;
}
.notif-search-field input::placeholder { color: var(--muted); }

.notif-preset-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.notif-ghost-btn {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--glass-hairline);
  color: var(--ink);
  border-radius: 999px;
  padding: 9px 15px;
  font-size: 0.86rem;
  font-weight: 600;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  font-family: inherit;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}
.notif-ghost-btn svg { width: 14px; height: 14px; }
.notif-ghost-btn:hover {
  border-color: var(--accent-solid);
  background: var(--accent-soft);
  transform: translateY(-1px);
}

.notif-tag-pinned {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 8px 4px;
  border-radius: var(--radius-sm, 10px);
  margin-bottom: 22px;
  cursor: pointer;
  user-select: none;
  position: relative;
  transition: background 150ms ease;
}
.notif-tag-pinned:hover { background: rgba(255, 255, 255, 0.04); }
.notif-tag-pinned[hidden] { display: none; }
.notif-tag-pinned input { position: absolute; opacity: 0; width: 0; height: 0; }
.notif-tag-pinned-text { min-width: 0; }
.notif-tag-pinned-text strong { display: block; font-size: 0.98rem; color: var(--ink); }
.notif-tag-pinned-text small { font-size: 0.83rem; color: var(--muted); }

/*
 * Gleicher rot/gruener Schalter wie "Art der Meldungen" oben (siehe
 * embedded/push/push-switch.css) statt einer Checkbox. Nur die Farb-/
 * Groessen-Regeln des Schalters selbst liegen dort; hier die
 * Positionierung innerhalb der Pille (LINKS, per order vor Icon/Text
 * gezogen) und die Regel, WANN er als "an" gilt - dort steuert
 * ":checked", hier die von der Chip-Auswahl selbst verwaltete Klasse
 * ".is-selected" (der Track ist kein Geschwister-Element eines
 * <input>, sondern haengt am naechsthoeheren Chip/Pinned-Element).
 */
.notif-tag-check {
  order: -1;
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.notif-tag-pinned.is-selected .notif-tag-check .tva-push-switch__track,
.notif-tag-chip.is-selected .notif-tag-check .tva-push-switch__track {
  background: var(--tva-switch-on);
}
.notif-tag-pinned.is-selected .notif-tag-check .tva-push-switch__track::after,
.notif-tag-chip.is-selected .notif-tag-check .tva-push-switch__track::after {
  transform: translateX(28px);
}

.notif-tag-group-title {
  display: flex; align-items: baseline; gap: 8px;
  margin: 0 0 14px; font-size: 0.82rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted);
}
.notif-tag-group-title .notif-tag-count { font-weight: 400; text-transform: none; letter-spacing: normal; }

/*
 * Gleiches 3-Spalten-Layout mit Kategorie-Ueberschriften wie das
 * "Sportangebot"-Mega-Menue (siehe embedded/navigation/
 * navigation.html, .mega-menu-columns/.menu-section-label) - inkl.
 * derselben 6 Kategorien, Icons UND derselben max-content-Spaltenbreite:
 * jede Spalte ist nur so breit wie ihr laengster Eintrag, statt sich
 * (wie bei "1fr") gleichmaessig ueber die gesamte verfuegbare Breite
 * zu strecken und viel Leerraum hinter kurzen Namen wie "Boxen" zu
 * hinterlassen.
 */
.notif-dept-columns {
  display: grid;
  grid-template-columns: repeat(3, max-content);
  gap: 0 32px;
}
@media (max-width: 860px) {
  .notif-dept-columns { grid-template-columns: 1fr; }
}
.notif-dept-column[hidden] { display: none; }

.notif-dept-category + .notif-dept-category { margin-top: 16px; }
.notif-dept-category[hidden] { display: none; }

/*
 * "Turnen & Geraeteturnen" (Spalte 1) und "Individualsport" (Spalte 2)
 * sollen auf gleicher Hoehe stehen - gleicher Trick wie im
 * "Sportangebot"-Mega-Menue (siehe embedded/core/styles.css,
 * .menu-section-label--align-individualsport): fester zusaetzlicher
 * Abstand, weil "Kinder & Familie" darueber mehr Zeilen hat als
 * "Ballsport" + "Kampfsport" zusammen.
 */
.notif-dept-category + .notif-dept-category.notif-dept-category--align-individualsport { margin-top: 64px; }

.notif-dept-category-title {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 0 6px;
  font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--navy-soft);
}
.notif-dept-category-icon { width: 15px; height: 15px; color: var(--accent-solid); flex-shrink: 0; }

/*
 * Keine Pillen mehr, sondern schlichte Zeilen (Schalter links, Text
 * rechts) - gleicher Aufbau wie .notif-type-row in Schritt 2. Der
 * Schalter hat durch order:-1 (siehe .notif-tag-check oben) immer
 * dieselbe feste Breite ganz links, unabhaengig von der Textlaenge -
 * dadurch stehen alle Schalter einer Spalte automatisch in derselben
 * senkrechten Flucht untereinander.
 */
.notif-tag-chip {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 4px;
  border-radius: var(--radius-sm, 10px);
  cursor: pointer;
  user-select: none;
  font-size: 0.92rem;
  color: var(--ink);
  position: relative;
  transition: background 150ms ease;
}
.notif-tag-chip[hidden] { display: none; }
.notif-tag-chip:hover { background: rgba(255, 255, 255, 0.04); }
.notif-tag-chip input {
  position: absolute; opacity: 0; width: 0; height: 0;
}

.notif-tag-empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 18px 4px;
  text-align: center;
}

/*
 * Ohne aktive Meldungsart (Schritt 2) hat die Themenauswahl keine
 * Wirkung - eine Meldung erreicht den Nutzer nur, wenn Art UND Thema
 * passen (siehe Hinweistext in Schritt 2). Die Slider werden deshalb
 * ausgegraut und (per disabled-Attribut, siehe updateTagsAvailability()
 * im Script unten) unbedienbar gemacht, solange weder "Hinweise" noch
 * "Kalendereintraege" ausgewaehlt sind.
 */
#notif-tags-panel.is-types-disabled .notif-tag-chip,
#notif-tags-panel.is-types-disabled .notif-tag-pinned {
  opacity: 0.45;
  pointer-events: none;
}

/* ---------- save bar ---------- */
.notif-save-bar {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  margin-top: 40px;
}
.notif-save-bar-count { font-size: 0.92rem; color: var(--muted); }
.notif-save-bar-count strong { color: var(--ink); font-size: 1.05rem; }
.notif-save-bar-actions { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

.notif-save-state {
  display: flex; align-items: center; gap: 6px;
  font-size: 0.86rem; color: var(--muted); min-height: 1.3em;
}
.notif-save-state .save-icon { width: 14px; height: 14px; flex-shrink: 0; display: none; }
.notif-save-state.is-saved { color: var(--status-success, #3f906b); }
.notif-save-state.is-saved .save-icon-check { display: inline-block; }
.notif-save-state.is-error { color: var(--membership-cta-bg, #cf4d5c); }
.notif-save-state.is-error .save-icon-alert { display: inline-block; }
.notif-save-state.is-dirty { color: var(--status-warning, #d99a3d); font-weight: 700; }
.notif-save-state.is-dirty .save-icon-dirty { display: none; }

.notif-primary-btn {
  position: relative;
  background: var(--accent-solid);
  color: var(--accent-contrast);
  border: none;
  border-radius: 999px;
  padding: 12px 24px;
  font-weight: 700;
  font-size: 0.92rem;
  cursor: pointer;
  font-family: inherit;
  box-shadow: 0 8px 20px color-mix(in srgb, var(--accent-solid) 30%, transparent);
  transition: transform 150ms ease, filter 150ms ease;
}
.notif-primary-btn:hover { transform: translateY(-1px); filter: brightness(1.05); }
.notif-primary-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/*
 * Ohne ungespeicherte Aenderungen ("Auswahl gespeichert") gibt es
 * nichts zu tun - der Button soll dann nicht mehr wie ein primaerer
 * Call-to-Action hervorstechen, sondern zurueckhaltend wie die
 * .notif-ghost-btn-Buttons oben wirken. Die Klasse wird passend zum
 * Dirty-State per JS gesetzt (siehe updateDirtyState()).
 */
.notif-primary-btn.is-saved {
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  box-shadow: none;
  border: 1px solid var(--glass-hairline);
}
.notif-primary-btn.is-saved:hover { transform: none; filter: none; }

/*
 * Gleicher "Bubble"-Konfetti-Hover-Effekt wie beim Button "Ort und
 * Datum in alle Unterschriftsfelder uebernehmen" (.tva-bubble-button
 * in pages/service/beitrittserklaerung-online-assistent/
 * beitrittserklaerung.css, urspruenglich von Uiverse.io). Hier lokal
 * kopiert statt die fremde CSS-Datei einzubinden, mit eigenen
 * Keyframe-Namen (notifBubble* statt tvaBubble*), damit nichts mit der
 * anderen Seite kollidiert. Zusaetzlich zu ":hover" greift dieselbe
 * Animation auch ueber die Klasse ".notif-btn-pulse" - darueber loest
 * das Script unten den Effekt automatisch aus, solange ungespeicherte
 * Aenderungen offen sind (siehe startSavePulse() im Script).
 */
.notif-primary-btn::before,
.notif-primary-btn::after {
  position: absolute;
  content: "";
  width: 150%;
  left: 50%;
  height: 100%;
  transform: translateX(-50%);
  z-index: -1000;
  background-repeat: no-repeat;
}

.notif-primary-btn:not(.is-saved):hover::before,
.notif-primary-btn.notif-btn-pulse::before {
  top: -70%;
  background-image: radial-gradient(circle, var(--accent-solid) 20%, transparent 20%),
    radial-gradient(circle, transparent 20%, var(--accent-solid) 20%, transparent 30%),
    radial-gradient(circle, var(--accent-solid) 20%, transparent 20%),
    radial-gradient(circle, var(--accent-solid) 20%, transparent 20%),
    radial-gradient(circle, transparent 10%, var(--accent-solid) 15%, transparent 20%),
    radial-gradient(circle, var(--accent-solid) 20%, transparent 20%),
    radial-gradient(circle, var(--accent-solid) 20%, transparent 20%),
    radial-gradient(circle, var(--accent-solid) 20%, transparent 20%),
    radial-gradient(circle, var(--accent-solid) 20%, transparent 20%);
  background-size: 10% 10%, 20% 20%, 15% 15%, 20% 20%, 18% 18%, 10% 10%, 15% 15%,
    10% 10%, 18% 18%;
  background-position: 50% 120%;
  animation: notifBubbleTop 0.6s ease;
}

@keyframes notifBubbleTop {
  0% {
    background-position: 5% 90%, 10% 90%, 10% 90%, 15% 90%, 25% 90%, 25% 90%,
      40% 90%, 55% 90%, 70% 90%;
  }
  50% {
    background-position: 0% 80%, 0% 20%, 10% 40%, 20% 0%, 30% 30%, 22% 50%,
      50% 50%, 65% 20%, 90% 30%;
  }
  100% {
    background-position: 0% 70%, 0% 10%, 10% 30%, 20% -10%, 30% 20%, 22% 40%,
      50% 40%, 65% 10%, 90% 20%;
    background-size: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
  }
}

.notif-primary-btn:not(.is-saved):hover::after,
.notif-primary-btn.notif-btn-pulse::after {
  bottom: -70%;
  background-image: radial-gradient(circle, var(--accent-solid) 20%, transparent 20%),
    radial-gradient(circle, var(--accent-solid) 20%, transparent 20%),
    radial-gradient(circle, transparent 10%, var(--accent-solid) 15%, transparent 20%),
    radial-gradient(circle, var(--accent-solid) 20%, transparent 20%),
    radial-gradient(circle, var(--accent-solid) 20%, transparent 20%),
    radial-gradient(circle, var(--accent-solid) 20%, transparent 20%),
    radial-gradient(circle, var(--accent-solid) 20%, transparent 20%);
  background-size: 15% 15%, 20% 20%, 18% 18%, 20% 20%, 15% 15%, 20% 20%, 18% 18%;
  background-position: 50% 0%;
  animation: notifBubbleBottom 0.6s ease;
}

@keyframes notifBubbleBottom {
  0% {
    background-position: 10% -10%, 30% 10%, 55% -10%, 70% -10%, 85% -10%,
      70% -10%, 70% 0%;
  }
  50% {
    background-position: 0% 80%, 20% 80%, 45% 60%, 60% 100%, 75% 70%, 95% 60%,
      105% 0%;
  }
  100% {
    background-position: 0% 90%, 20% 90%, 45% 70%, 60% 110%, 75% 80%, 95% 70%,
      110% 10%;
    background-size: 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%, 0% 0%;
  }
}

@media (max-width: 640px) {
  .notif-status-card { flex-wrap: wrap; }
  .notif-save-bar { align-items: stretch; }
  .notif-save-bar-actions { justify-content: space-between; }
}
