/* SeaTrack v97.72 — header Alerts bell + sheet */
.al-bell {
  position: relative;
  width: 40px; height: 40px; flex: none;
  border-radius: 12px;
  border: 1px solid rgba(148, 163, 184, 0.35);
  background: rgba(15, 23, 42, 0.55);
  color: #e2e8f0;
  display: inline-flex; align-items: center; justify-content: center;
  margin-right: 2px;
  cursor: pointer;
  transform-origin: 50% 8%;
  -webkit-tap-highlight-color: transparent;
}
.al-bell-hot { border-color: rgba(248, 113, 113, 0.55); color: #fecaca; background: rgba(127, 29, 29, 0.25); }
.al-bell-svg { display: block; }
.al-bell-count {
  position: absolute; top: 1px; right: 1px; /* v97.77: keep inside hit target — fit first */
  min-width: 16px; height: 16px; padding: 0 4px;
  border-radius: 999px;
  background: #e3051b; color: #fff;
  font: 800 10px/16px system-ui, -apple-system, sans-serif;
  text-align: center;
  border: 1.5px solid #0b1218;
  box-shadow: 0 1px 4px rgba(0,0,0,.45);
  pointer-events: none;
}
.al-bell-count[hidden] { display: none !important; }

@keyframes al-bell-wiggle {
  0% { transform: rotate(0deg); }
  12% { transform: rotate(14deg); }
  24% { transform: rotate(-12deg); }
  36% { transform: rotate(10deg); }
  48% { transform: rotate(-8deg); }
  60% { transform: rotate(5deg); }
  72% { transform: rotate(-3deg); }
  100% { transform: rotate(0deg); }
}
.al-bell-shake { animation: al-bell-wiggle 0.9s ease-in-out 1; }
@media (prefers-reduced-motion: reduce) {
  .al-bell-shake { animation: none !important; }
}

/* Compact header at 360–390px */
@media (max-width: 400px) {
  .al-bell, .fav-btn { width: 36px; height: 36px; border-radius: 10px; }
  .al-bell { margin-right: 0; }
  .fav-btn { margin-right: 2px; font-size: 16px; }
  .header-right { gap: 0.25rem; }
  .app-header .brand h1 { font-size: 15px; }
}

/* Map wn-badge retired — header bell is the single entry */
#wn-badge { display: none !important; }

/* v97.74h: no persistent Rules map chip (overlapped zoom). Flash-only on GPS state change. */
.sr-pending-dot,
.sr-pending-dot.sr-rules-chip { display: none !important; }
.sr-rules-ic { font-size: calc(13px * var(--ts, 1)); line-height: 1; }
.sr-rules-lab { letter-spacing: 0.02em; }

/* Sheet */
.al-sheet {
  position: fixed; inset: 0; z-index: 9500;
  background: rgba(2, 8, 16, 0.55);
  display: flex; align-items: flex-end; justify-content: center;
}
.al-sheet[hidden] { display: none !important; }
.al-sheet-card {
  width: min(480px, 100%);
  max-height: min(78vh, 640px);
  background: #0f1b27; color: #e8eef4;
  border-radius: 18px 18px 0 0;
  border: 1px solid #243447;
  box-shadow: 0 -8px 32px rgba(0,0,0,.45);
  display: flex; flex-direction: column;
  padding: 0 0 env(safe-area-inset-bottom, 0);
}
.al-sheet-head {
  display: flex; align-items: center; gap: 8px;
  padding: 14px 14px 10px; border-bottom: 1px solid #1f3347;
}
.al-sheet-head h2 { margin: 0; font-size: 1.05rem; flex: 1; }
.al-sheet-body { overflow: auto; padding: 10px 12px 8px; -webkit-overflow-scrolling: touch; }
.al-sheet-foot {
  margin: 0; padding: 8px 14px 14px;
  font-size: calc(11px * var(--ts, 1)); line-height: 1.35; color: #94a3b8;
}
.al-h {
  margin: 10px 4px 6px; font-size: calc(11px * var(--ts, 1)); font-weight: 800;
  letter-spacing: 0.06em; text-transform: uppercase; color: #7dd3fc;
}
.al-list { display: flex; flex-direction: column; gap: 6px; }
.al-row {
  display: flex; align-items: center; gap: 8px; width: 100%;
  text-align: left; cursor: pointer;
  background: #13263a; border: 1px solid #1f3a52; border-radius: 12px;
  padding: 10px 10px; color: inherit; font: inherit;
}
.al-row-urgent { border-color: rgba(227, 5, 27, 0.55); background: rgba(127, 29, 29, 0.22); }
.al-row-t { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.al-row-t b { font-size: calc(14px * var(--ts, 1)); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-row-t small { font-size: calc(11.5px * var(--ts, 1)); color: #94a3b8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.al-row-go { color: #64748b; font-size: calc(18px * var(--ts, 1)); }
.al-empty { margin: 12px 4px; color: #94a3b8; font-size: calc(14px * var(--ts, 1)); line-height: 1.4; }
.al-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0 4px; }
.al-actions .btn { font-size: calc(13px * var(--ts, 1)); padding: 8px 10px; }

/* Startup unread prompt — once per launch with the bell shake */
.al-unread-pill {
  position: fixed;
  top: 56px;
  right: 12px;
  z-index: 9600;
  max-width: min(220px, 70vw);
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid rgba(248, 113, 113, 0.45);
  background: rgba(127, 29, 29, 0.92);
  color: #fff;
  font: 700  calc(12px * var(--ts, 1))/1.25 system-ui, -apple-system, sans-serif;
  letter-spacing: 0.01em;
  white-space: nowrap;
  box-shadow: 0 4px 14px rgba(0,0,0,.35);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  animation: al-unread-in 0.28s ease-out;
}
.al-unread-pill[hidden] { display: none !important; }
.al-unread-pill.al-unread-out { animation: al-unread-out 0.25s ease-in forwards; }
@keyframes al-unread-in {
  from { opacity: 0; transform: translateY(-4px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes al-unread-out {
  to { opacity: 0; transform: translateY(-4px) scale(0.96); }
}
@media (prefers-reduced-motion: reduce) {
  .al-unread-pill, .al-unread-pill.al-unread-out { animation: none !important; }
}
@media (max-width: 400px) {
  .al-unread-pill { font-size: calc(11px * var(--ts, 1)); padding: 6px 9px; max-width: min(200px, 68vw); }
}

/* v97.78c — alerts on hamburger + menu row (no header bell) */
#al-bell.al-bell { display: none !important; }
.menu-btn { position: relative !important; }
.menu-btn .al-menu-count {
  position: absolute !important;
  top: -2px !important;
  right: -2px !important;
  min-width: 16px !important;
  height: 16px !important;
  padding: 0 4px !important;
  border-radius: 999px !important;
  background: #ef4444 !important;
  color: #fff !important;
  font: 800 9px/16px "Segoe UI", "Helvetica Neue", Arial, sans-serif !important;
  text-align: center !important;
  box-shadow: 0 0 0 2px rgba(10,18,28,.95) !important;
  pointer-events: none !important;
  z-index: 2 !important;
}
.menu-btn .al-menu-count[hidden] { display: none !important; }
.menu-btn.menu-btn-hot { border-color: rgba(248,113,113,.55) !important; }
.sm-item.sm-alerts {
  display: flex !important;
  align-items: center !important;
  gap: 10px !important;
  width: 100% !important;
}
.sm-item.sm-alerts .sm-tx { flex: 1 1 auto !important; text-align: left !important; }
.sm-alerts-count {
  flex: 0 0 auto !important;
  min-width: 22px !important;
  height: 22px !important;
  padding: 0 7px !important;
  border-radius: 999px !important;
  background: #ef4444 !important;
  color: #fff !important;
  font: 800 11px/22px "Segoe UI", "Helvetica Neue", Arial, sans-serif !important;
  text-align: center !important;
}
.sm-alerts-count[hidden] { display: none !important; }
