/* ── sw-overlay.css — service worker update overlay ─────────────────────
   Fullscreen black overlay, above everything including splash (z 10000).
   Shown by pwa.js when a new SW installs/activates.
   Displays a live log of SW lifecycle events for easy debugging.
────────────────────────────────────────────────────────────────────────── */

#sw-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background: rgba(0, 0, 0, 0.93);
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  padding: 1.25rem 1.25rem 1.25rem 1.25rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
#sw-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

#sw-overlay-inner {
  width: min(480px, 92vw);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

#sw-overlay-title {
  font-family: var(--font);
  font-size: var(--text-md);
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

#sw-overlay-badge {
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #000;
  background: var(--warning);
  border-radius: 4px;
  padding: 0.15em 0.5em;
}

/* ── Log panel ───────────────────────────────────────────────── */
#sw-log {
  font-family: 'Cascadia Code', 'Fira Mono', monospace;
  font-size: var(--text-xs);
  line-height: 1.7;
  display: flex;
  flex-direction: column;
  max-height: 60vh;
  overflow-y: auto;
}

#sw-log .sw-log-line {
  display: flex;
  gap: 0.75rem;
  padding: 0.05rem 0;
}

#sw-log .sw-log-ts {
  color: rgba(255, 255, 255, 0.2);
  flex-shrink: 0;
  user-select: none;
}

#sw-log .sw-log-msg              { color: rgba(255, 255, 255, 0.6); }
#sw-log .sw-log-line.ok   .sw-log-msg { color: rgb(130, 210, 130); }
#sw-log .sw-log-line.warn .sw-log-msg { color: var(--warning); }
#sw-log .sw-log-line.err  .sw-log-msg { color: var(--danger); }
