/* =====================================================================
   UPOZORNĚNÍ (/upozorneni, #view-notifications, js/upozorneni.js)
   ---------------------------------------------------------------------
   Vzhled podle kontaktu (css/subpage.css) a nabídky účtu: karty s obrysem a tvrdým stínem navigační pilulky.
   Barvy jen z tokenů v :root (storybook.css, brand.css), stránka je vždy ve dne jako celý web mimo čtečku.
   Načítá se až za storybook.css. Tečka na tlačítku účtu je tady taky, podstránky ji nepoužívají.
   ===================================================================== */

/* ── Medová tečka: nové zprávy (třída has-notif na #main-nav). Na telefonu je tlačítko účtu v menu, tečka je i na hamburgeru ── */
.nav.has-notif .nav__user-btn { position: relative; }
.nav.has-notif .nav__user-btn::after,
.nav.has-notif #nav-notif-link::after {
  content: '';
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--pal-honey-badge);
  border: 2px solid var(--pal-honey-ink);
  box-sizing: border-box;
}
.nav.has-notif .nav__user-btn::after { position: absolute; top: -3px; right: -1px; }
.nav.has-notif #nav-notif-link::after { flex: none; margin-left: auto; }
@media (max-width: 980px) {
  .nav.has-notif .nav__hamburger::after {
    content: '';
    position: absolute;
    top: -4px;
    right: -4px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--pal-honey-badge);
    border: 2px solid var(--pal-honey-ink);
    box-sizing: border-box;
  }
}
.notif-sr {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ── Stránka ── */
#view-notifications {
  overflow-x: clip;
  background:
    radial-gradient(ellipse at 4% 0%, color-mix(in oklab, var(--highlight) 26%, transparent), transparent 44%),
    radial-gradient(ellipse at 98% 18%, color-mix(in oklab, var(--pal-lav-edge) 26%, transparent), transparent 46%),
    var(--paper);
}
.notif-page {
  width: var(--wrap);
  max-width: 1080px;
  margin-inline: auto;
  padding: clamp(22px, 4vw, 48px) 0 clamp(48px, 7vw, 84px);
  box-sizing: border-box;
}
.notif-hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 8px 28px; }
.notif-hero__title { margin: 0; font: var(--w-display) clamp(34px, 4.6vw, 56px)/1.04 var(--font-display); letter-spacing: -1.6px; color: var(--ink); }
.notif-hero__lead { max-width: 54ch; margin: 14px 0 0; font-size: 17px; line-height: 1.6; color: var(--ink-2); }
.notif-hero__mascot { --mascot-size: clamp(88px, 12vw, 148px); width: var(--mascot-size); margin-bottom: -8px; }

.notif-grid { display: grid; gap: 22px; margin-top: clamp(22px, 3.5vw, 40px); }
@media (min-width: 981px) {
  .notif-grid { grid-template-columns: minmax(0, 1.5fr) minmax(320px, 1fr); gap: 32px; align-items: start; }
  .notif-card--settings { position: sticky; top: calc(var(--nav-space) + 18px); }
}

/* Karta = chrom navigační pilulky (stejně jako .contact-card) */
.notif-card {
  min-width: 0;
  padding: clamp(20px, 3vw, 32px);
  background: var(--card);
  border: 1.5px solid var(--ui-bar-edge);
  border-radius: var(--radius-lg);
  box-shadow: 0 5px 0 var(--ui-bar-shadow);
  box-sizing: border-box;
}
.notif-card__title { margin: 0; font: var(--w-display) clamp(22px, 2.2vw, 26px)/1.2 var(--font-display); letter-spacing: -0.5px; color: var(--ink); }

/* ── Zprávy ── */
.notif-list { list-style: none; margin: 14px 0 0; padding: 0; }
.notif-list[aria-busy="true"]:empty::before {
  content: '';
  display: block;
  height: 112px;
  border-radius: 16px;
  background: var(--pal-sage-1);
}
.notif-item { padding: 16px 0; border-top: 1.5px solid var(--line); }
.notif-item:first-child { border-top: 0; padding-top: 6px; }
.notif-item:last-child { padding-bottom: 0; }
.notif-item__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 0 0 4px; font-size: 14px; color: var(--ink-faded); }
.notif-item__new {
  padding: 1px 9px;
  background: var(--pal-honey-1);
  color: var(--pal-honey-ink);
  border: 1px solid var(--pal-honey-edge);
  border-radius: 30px;
  font: var(--w-heavy) 12px/1.5 var(--font);
}
/* Štítek obchodního sdělení nad titulkem: vidět na první pohled, tlumeně jako datum */
.notif-item__os { font: var(--w-heavy) 12px/1.5 var(--font); color: var(--ink-faded); }
.notif-item__title { margin: 0; font: var(--w-heavy) 17px/1.3 var(--font); color: var(--ink); overflow-wrap: anywhere; }
.notif-item__text { margin: 6px 0 0; font-size: 16px; line-height: 1.55; color: var(--ink-2); overflow-wrap: anywhere; }
.notif-item__link { margin-top: 12px; }
.notif-item__legal { margin: 10px 0 0; font-size: 13px; line-height: 1.5; color: var(--ink-faded); }
.notif-item__off {
  display: inline;
  padding: 0;
  background: none;
  border: 0;
  font: inherit;
  color: var(--ink);
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.notif-empty { margin: 14px 0 0; font-size: 16px; line-height: 1.6; color: var(--ink-soft); }
.notif-error { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-top: 14px; font-size: 15px; font-weight: 800; color: var(--status-error); }
.notif-error p { margin: 0; }
.notif-more { margin-top: 18px; }

/* ── Přepínače ── */
.notif-browser {
  margin-top: 14px;
  padding: 12px 14px;
  border-radius: 14px;
  background: var(--pal-honey-1);
  border: 1.5px solid var(--pal-honey-edge);
  color: var(--pal-honey-ink);
  font-size: 15px;
  line-height: 1.5;
}
.notif-browser p { margin: 0; }
.notif-browser .btn { margin-top: 10px; }
.notif-group { margin-top: 14px; padding-top: 6px; border-top: 1.5px solid var(--line); }
.notif-browser + .notif-group { border-top: 0; }
.notif-card__title + .notif-group { border-top: 0; padding-top: 0; }
.notif-group__note { margin: 2px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-faded); }

.notif-switch { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 56px; padding: 8px 0; cursor: pointer; }
.notif-switch__text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.notif-switch__title { font: var(--w-heavy) 16px/1.3 var(--font); color: var(--ink); }
.notif-switch__sub { font-size: 14px; line-height: 1.45; color: var(--ink-soft); }
/* Skutečný checkbox přes celý řádek: klepnutí kamkoli, fokus a čtečka obrazovky bez další práce */
.notif-switch__input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.notif-switch__track {
  position: relative;
  flex: none;
  width: 52px;
  height: 32px;
  border-radius: 999px;
  background: var(--paper-2);
  border: 1.5px solid var(--ink-soft);
  box-sizing: border-box;
}
.notif-switch__track::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 23px;
  height: 23px;
  border-radius: 50%;
  background: var(--ink-soft);
}
.notif-switch__input:checked + .notif-switch__track { background: var(--pal-sage-1); border-color: var(--pal-sage-ink); }
.notif-switch__input:checked + .notif-switch__track::after { left: 23px; background: var(--pal-sage-ink); }
.notif-switch__input:focus-visible + .notif-switch__track { outline: 3px solid var(--focus-ring); outline-offset: 2px; }
.notif-switch__input:disabled { cursor: default; }
.notif-switch:has(.notif-switch__input:disabled) { cursor: default; }
.notif-switch__input:disabled + .notif-switch__track { opacity: 0.55; }
@media (prefers-reduced-motion: no-preference) {
  .notif-switch__track::after { transition: left var(--dur-fast) var(--ease-out-quint); }
}

.notif-note:empty { display: none; }
.notif-note { margin: 12px 0 0; font-size: 15px; line-height: 1.5; font-weight: 800; color: var(--ink); }
.notif-retry { margin-top: 10px; }
.notif-foot { margin: 12px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-faded); }
