/* demo.css — chrome for the public guided demo (top bar, control bar, overlay) */

body.demo-body {
  padding-top: 54px;            /* room for the fixed demo top bar */
  padding-bottom: 220px;        /* room for the fixed control bar + scroll headroom */
}

/* ── Top bar ─────────────────────────────────────────────────────────────── */
.demo-topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 54px;
  z-index: 70;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.demo-badge {
  background: linear-gradient(135deg, #0071e3, #7b3ff2);
  color: #fff; font-size: 11px; font-weight: 800; letter-spacing: 0.08em;
  padding: 3px 8px; border-radius: 6px; flex-shrink: 0;
}
.demo-title { font-weight: 700; font-size: 15px; color: #1d1d1f; flex-shrink: 0; }
.demo-lang-select {
  margin-left: auto;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #d2d2d7;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: #1d1d1f;
  cursor: pointer;
  max-width: 130px;
}

/* Language chooser (first screen) */
.demo-lang-overlay { z-index: 90; }
.demo-lang-card {
  background: #fff; border-radius: 22px; padding: 28px 24px; text-align: center;
  max-width: 380px; width: 100%; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.25);
}
.demo-lang-globe { font-size: 38px; margin-bottom: 6px; }
.demo-lang-head { font-size: 19px; font-weight: 800; color: #1d1d1f; margin-bottom: 18px; }
.demo-lang-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.demo-lang-opt {
  padding: 13px 10px; border-radius: 12px; border: 1.5px solid #e5e5ea; background: #fff;
  font-size: 16px; font-weight: 700; color: #1d1d1f; cursor: pointer;
  transition: border-color 0.12s, background 0.12s, transform 0.08s;
}
.demo-lang-opt:hover { border-color: #0071e3; background: #f0f6ff; }
.demo-lang-opt:active { transform: scale(0.97); }
@media (max-width: 360px) { .demo-lang-grid { grid-template-columns: 1fr; } }
.demo-trial {
  flex-shrink: 0; background: #0071e3; color: #fff; text-decoration: none;
  font-size: 12.5px; font-weight: 700; padding: 7px 12px; border-radius: 999px; white-space: nowrap;
}
.demo-exit {
  flex-shrink: 0; width: 32px; height: 32px; display: flex; align-items: center; justify-content: center;
  border-radius: 50%; color: #6e6e73; text-decoration: none; font-size: 22px; line-height: 1;
}
.demo-exit:hover { background: #ebebf0; color: #1d1d1f; }
@media (max-width: 520px) {
  .demo-title { display: none; }
  .demo-trial { padding: 7px 10px; }
}

/* ── Highlight ring on the element being narrated ───────────────────────── */
.tm-voice-target {
  outline: 3px solid #0071e3;
  outline-offset: 3px;
  border-radius: 10px;
  box-shadow: 0 0 0 6px rgba(0, 113, 227, 0.18);
  /* Keep the highlighted card clear of the fixed top bar and bottom control bar. */
  scroll-margin-top: 70px;
  scroll-margin-bottom: 190px;
  transition: outline-color 0.15s, box-shadow 0.15s;
}

/* ── Bottom control bar ──────────────────────────────────────────────────── */
.demo-bar {
  position: fixed;
  left: 50%; transform: translateX(-50%);
  bottom: 18px; z-index: 70;
  width: min(460px, calc(100vw - 24px));
  background: #fff;
  border: 1px solid #e5e5ea;
  border-radius: 20px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.16), 0 8px 24px rgba(0, 0, 0, 0.08);
  padding: 12px 16px 14px;
}
.demo-bar-top { margin-bottom: 4px; }
.demo-prog { font-size: 11px; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; color: #0071e3; }
.demo-bar-text { font-size: 15px; line-height: 1.5; color: #1d1d1f; margin-bottom: 10px; }
.demo-ctrls { display: flex; align-items: center; justify-content: center; gap: 14px; }
.demo-btn {
  width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid #d2d2d7; background: #fff; font-size: 18px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.1s, transform 0.08s;
}
.demo-btn:hover { background: #ebebf0; }
.demo-btn:active { transform: scale(0.92); }
.demo-btn--main {
  width: 54px; height: 54px; background: #0071e3; border-color: #0071e3; color: #fff; font-size: 20px;
}
.demo-btn--main:hover { background: #0063cc; }

/* ── Tap-to-start / continue overlay ─────────────────────────────────────── */
.demo-overlay {
  position: fixed; inset: 0; z-index: 80;
  background: rgba(15, 17, 26, 0.55);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
.demo-overlay-btn {
  background: linear-gradient(135deg, #0071e3, #7b3ff2);
  color: #fff; border: none; border-radius: 999px;
  font-size: 18px; font-weight: 800; padding: 18px 34px; cursor: pointer;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3);
  animation: demo-pulse 2s ease-in-out infinite;
}
@keyframes demo-pulse {
  0%, 100% { box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3), 0 0 0 0 rgba(123, 63, 242, 0.5); }
  50%      { box-shadow: 0 12px 36px rgba(0, 0, 0, 0.3), 0 0 0 14px rgba(123, 63, 242, 0); }
}

/* ── End card ────────────────────────────────────────────────────────────── */
.demo-end-card {
  background: #fff; border-radius: 22px; padding: 32px 28px; text-align: center;
  max-width: 340px; box-shadow: 0 24px 64px rgba(0, 0, 0, 0.2);
}
.demo-end-emoji { font-size: 44px; margin-bottom: 8px; }
.demo-end-title { font-size: 20px; font-weight: 800; color: #1d1d1f; margin-bottom: 18px; }
.demo-end-cta {
  display: block; background: #0071e3; color: #fff; text-decoration: none;
  font-size: 16px; font-weight: 700; padding: 13px; border-radius: 12px; margin-bottom: 10px;
}
.demo-end-replay { background: none; border: none; color: #6e6e73; font-size: 14px; font-weight: 600; cursor: pointer; }

/* Lift the demo's New Bill fab above the bottom control bar (and above it in
   stacking, so its highlight ring stays visible). */
body.demo-body .fab { bottom: 172px; z-index: 72; }

@media (prefers-reduced-motion: reduce) { .demo-overlay-btn { animation: none; } }
