/* ─────────────────────────────────────────────
   Patron View — Vanessa App
   Dark theme; centered stoplight; no browser chrome.
   ───────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html, body {
  height: 100%;
  overflow: hidden;           /* no scroll — native app feel */
  background:
    radial-gradient(circle at 50% 18%, rgba(255, 255, 255, 0.035), transparent 26rem),
    #0f0f0f;
  color: #f0f0f0;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  -webkit-user-select: none;  /* no text selection */
  user-select: none;
}

/* Disable right-click context menu via JS in patron.js,
   but also visually indicate nothing is selectable here. */

/* ── Layout ─────────────────────────────────── */
.app {
  height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 24px;
  padding: 32px 16px;
}

/* ── Tagline ─────────────────────────────────── */
.tagline {
  font-size: clamp(0.9rem, 3vw, 1.1rem);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #888;
}

/* ── Logo ────────────────────────────────────── */
.logo {
  max-width: 200px;
  width: 60vw;
  object-fit: contain;
}

/* ── Stoplight housing ───────────────────────── */
.stoplight {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  background: linear-gradient(to bottom, #272727 0%, #181818 100%);
  border: 2px solid #2a2a2a;
  border-top-color: #3e3e3e;
  border-bottom-color: #111;
  border-radius: 60px;
  padding: 24px 20px;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.6),
    inset 0 2px 4px rgba(255, 255, 255, 0.04);
}

/* ── Individual bulbs ────────────────────────── */
.bulb {
  width: 88px;
  height: 88px;
  border-radius: 50%;
  transition: background 0.4s ease, box-shadow 0.4s ease;
  /* recessed look when inactive */
  box-shadow: inset 0 4px 10px rgba(0, 0, 0, 0.6);
}

/* Inactive — lens gradient: faint highlight spot simulates glass surface */
.bulb.red {
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.10) 0%, transparent 55%),
    #3d1010;
}
.bulb.yellow {
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.10) 0%, transparent 55%),
    #3d2e08;
}
.bulb.green {
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.10) 0%, transparent 55%),
    #0a2e12;
}

/* ── Pulse animation ─────────────────────────── */
/* Plays once when the active class is first added. */
/* The bulb pops to a brighter glow then settles.  */
@keyframes bulb-pulse {
  0%   { transform: scale(1);    filter: brightness(1);   }
  35%  { transform: scale(1.1);  filter: brightness(1.4); }
  100% { transform: scale(1);    filter: brightness(1);   }
}

/* ── Active / glowing states ─────────────────── */
/* These classes are toggled by patron.js           */

.bulb.red.active {
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.25) 0%, transparent 50%),
    #ff3b30;
  box-shadow:
    0 0 10px 4px  rgba(255, 59, 48, 0.95),
    0 0 45px 18px rgba(255, 59, 48, 0.35),
    inset 0 4px 10px rgba(255, 255, 255, 0.15);
  animation: bulb-pulse 0.55s ease-out;
}

.bulb.yellow.active {
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.25) 0%, transparent 50%),
    #ffcc00;
  box-shadow:
    0 0 10px 4px  rgba(255, 204, 0, 0.95),
    0 0 45px 18px rgba(255, 204, 0, 0.35),
    inset 0 4px 10px rgba(255, 255, 255, 0.15);
  animation: bulb-pulse 0.55s ease-out;
}

.bulb.green.active {
  background:
    radial-gradient(circle at 35% 30%, rgba(255,255,255,0.25) 0%, transparent 50%),
    #34c759;
  box-shadow:
    0 0 10px 4px  rgba(52, 199, 89, 0.95),
    0 0 45px 18px rgba(52, 199, 89, 0.35),
    inset 0 4px 10px rgba(255, 255, 255, 0.15);
  animation: bulb-pulse 0.55s ease-out;
}

/* ── Add-to-Home-Screen nudge ────────────────── */
.a2hs-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  background: #1a1a1a;
  border-top: 1px solid #2e2e2e;
  padding: 12px 16px;
  padding-bottom: max(12px, env(safe-area-inset-bottom));
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.a2hs-banner__text {
  font-size: 0.85rem;
  color: #aaa;
  flex: 1;
}

.a2hs-banner__close {
  background: none;
  border: 1px solid #3e3e3e;
  border-radius: 8px;
  color: #888;
  font-size: 0.8rem;
  padding: 6px 12px;
  cursor: pointer;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
  flex-shrink: 0;
}

/* ── Status text ─────────────────────────────── */
.status-text {
  font-size: clamp(1rem, 4vw, 1.3rem);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-align: center;
  color: #d0d0d0;
  min-height: 1.6em;   /* prevents layout shift while loading */
  transition: color 0.4s ease;
}

.bell-button {
  position: fixed;
  left: 20px;
  bottom: max(20px, env(safe-area-inset-bottom));
  width: 44px;
  height: 44px;
  z-index: 20;
  border: 1px solid #333;
  border-radius: 50%;
  background: linear-gradient(180deg, #1d1d1d, #111);
  color: #777;
  font-size: 1.1rem;
  cursor: pointer;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.35);
  -webkit-tap-highlight-color: transparent;
}

.bell-button.active {
  color: #f0f0f0;
  border-color: #3e3e3e;
}
