/* ==========================================================================
   tinkytown-demo Bottom Nav — demo-bottom-nav.css
   --------------------------------------------------------------------------
   Companion to js/demo-bottom-nav.js. Visual parity with the kiosk's
   bottom-nav (Home / Numbers / Translate / Events). Numpad modal styling
   lives here too since it's only opened from this nav.
   ========================================================================== */

/* ── Bottom nav ─────────────────────────────────────────────────────── */
.demo-bottom-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 60;
  display: flex;
  justify-content: space-around;
  background: rgba(20, 17, 14, 0.96);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  padding: 6px 0;
  padding-bottom: max(6px, env(safe-area-inset-bottom));
}
.demo-nav-item {
  flex: 1 1 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  background: none;
  border: none;
  color: rgba(255, 255, 255, 0.55);
  font-family: inherit;
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  padding: 6px 8px;
  min-height: 52px;
  transition: color 0.15s ease;
}
.demo-nav-item svg {
  width: 22px;
  height: 22px;
  fill: currentColor;
  opacity: 0.7;
  transition: opacity 0.15s ease;
}
.demo-nav-item.active {
  color: #e8a33d;
}
.demo-nav-item.active svg { opacity: 1; }
.demo-nav-item:hover { color: rgba(255, 255, 255, 0.85); }
.demo-nav-item:focus-visible {
  outline: 3px solid #e8a33d;
  outline-offset: -3px;
  border-radius: 8px;
}

/* Reserve space at the bottom of the page so the fixed nav doesn't
   cover the input row / privacy footer. ~58px tall + iPhone safe area. */
body { padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)); }

/* Hide the nav during the autoplay demo — the demo controls the screen
   and the nav would let the user click off-script (and the demo's
   blocker overlay disables clicks anyway, so the nav would just look
   broken). Reappears when endDemo() removes body.demo-running. */
body.demo-running .demo-bottom-nav { display: none; }
body.demo-running { padding-bottom: 0; }

/* Listen overlay is full-screen and immersive — hide nav under it. */
.listen-overlay.active ~ .demo-bottom-nav,
body:has(.listen-overlay.active) .demo-bottom-nav { display: none; }

/* ── Numpad modal ───────────────────────────────────────────────────── */
.demo-numpad-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: dnumpadFade 0.18s ease;
}
@keyframes dnumpadFade { from { opacity: 0; } to { opacity: 1; } }
.demo-numpad-card {
  background: #1a1612;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  width: min(340px, 100%);
  padding: 18px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
}
.demo-numpad-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.demo-numpad-head h2 {
  margin: 0;
  font-size: 1.2rem;
  color: #e8a33d;
  font-weight: 800;
}
.demo-numpad-close {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: #fff;
  width: 34px;
  height: 34px;
  border-radius: 9px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.demo-numpad-close:hover { background: rgba(255, 255, 255, 0.14); }

.demo-numpad-display {
  background: rgba(0, 0, 0, 0.4);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 12px;
  font-family: var(--f-mono, ui-monospace, monospace);
  font-size: 1.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-align: right;
  min-height: 1.7em;
  color: #fff;
  word-break: break-all;
}

.demo-numpad-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-bottom: 12px;
}
.demo-numpad-key {
  min-height: 56px;
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.12s ease, transform 0.08s ease;
}
.demo-numpad-key:hover  { background: rgba(255, 255, 255, 0.12); }
.demo-numpad-key:active { transform: scale(0.96); }
.demo-numpad-aux {
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  font-size: 1.2rem;
}
.demo-numpad-actions {
  display: flex;
  gap: 8px;
}
.demo-numpad-clear,
.demo-numpad-speak {
  flex: 1 1 0;
  min-height: 50px;
  border: none;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 800;
  cursor: pointer;
}
.demo-numpad-clear {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.demo-numpad-clear:hover { background: rgba(255, 255, 255, 0.14); }
.demo-numpad-speak {
  background: linear-gradient(135deg, #e8a33d, #c8861f);
  color: #1a1612;
}
.demo-numpad-speak:hover { filter: brightness(1.1); }

/* ── Toast ───────────────────────────────────────────────────────────── */
.demo-bottom-toast {
  position: fixed;
  left: 50%;
  bottom: calc(78px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(8px);
  background: #1a1612;
  color: #fff;
  border: 1px solid rgba(232, 163, 61, 0.4);
  border-radius: 12px;
  padding: 10px 16px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5);
  opacity: 0;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 9500;
  max-width: 92vw;
  text-align: center;
}
.demo-bottom-toast.is-visible {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

@media (prefers-reduced-motion: reduce) {
  .demo-numpad-overlay,
  .demo-bottom-toast { animation: none; transition: none; }
}
