/* guide/app.css — Ascent HI Guide attendee page. VERSION 1.3.0 — 2026-10-28
   (Test-mode bar). 1.2.0 — 2026-10-28
   (ask bar under the video). 1.1.0 — 2026-10-28
   (agent panel → centered dialog, larger avatar). 1.0.0 — 2026-10-27.
   --brand / --accent come from the client's branding at load (app.js);
   defaults are Ascent HI Slate #2C3E50 + Gold #C5A059. */
:root {
  --brand: #2C3E50;
  --accent: #C5A059;
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1f2933;
  --muted: #64748b;
  --line: #e2e8f0;
  --danger: #b42318;
  --radius: 12px;
  --shadow: 0 8px 28px rgba(15, 23, 42, .12);
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; }
[hidden] { display: none !important; }
h1 { font-size: 24px; line-height: 1.25; margin: 0 0 8px; }
h2 { font-size: 20px; margin: 0; }
h3 { margin: 0 0 12px; }
input { font: inherit; color: var(--text); width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
input:focus { outline: 2px solid color-mix(in srgb, var(--brand) 40%, transparent); border-color: var(--brand); }
label { display: block; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 12px; }
label input { margin-top: 4px; font-weight: 400; }

.btn { font: inherit; font-weight: 600; cursor: pointer; border-radius: 8px; padding: 10px 14px; border: 1px solid var(--line); background: #fff; color: var(--text); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.accent { background: var(--accent); border-color: var(--accent); color: #1f2933; }
.btn.ghost { background: transparent; }
.link { background: none; border: 0; padding: 0; color: var(--brand); font: inherit; font-size: 13px; cursor: pointer; text-decoration: underline; }
.link:disabled { color: var(--muted); text-decoration: none; cursor: default; }
.icon-btn { background: none; border: 0; font-size: 16px; cursor: pointer; color: var(--muted); margin-left: auto; padding: 4px 8px; }

/* Centered cards: loading, unavailable, gate */
.view { min-height: 100vh; }
#viewLoading, #viewUnavailable, #viewGate { display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.center-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 32px; width: 100%; max-width: 440px; text-align: left; }
#viewLoading .center-card, #viewUnavailable .center-card { text-align: center; }
.eyebrow { color: var(--accent); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: .06em; margin: 0 0 6px; }
.lede { color: var(--muted); margin: 0 0 20px; }
.fine { color: var(--muted); font-size: 12px; margin: 12px 0 0; }
.form-error { color: var(--danger); font-size: 14px; margin: 0 0 12px; }
form .btn.primary { width: 100%; }
.row-links { display: flex; justify-content: space-between; margin-top: 14px; }
.brand-logo { max-height: 48px; max-width: 200px; margin-bottom: 16px; object-fit: contain; }
.brand-logo.small { max-height: 34px; max-width: 140px; margin: 0; }
.spinner { width: 32px; height: 32px; margin: 0 auto 12px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--brand); animation: spin 0.9s linear infinite; }
#turnstileBox:not(:empty) { margin-bottom: 12px; }

/* Demo view */
.preview-bar { background: #fef3c7; color: #78350f; font-size: 14px; text-align: center; padding: 8px 16px; }
.topbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 20px; background: var(--brand); color: #fff; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.brand-company { font-weight: 700; }
.brand-title { font-size: 13px; opacity: .8; }
.topbar .btn.ghost { color: #fff; border-color: rgba(255, 255, 255, .45); }

.layout { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 20px; padding: 20px; max-width: 1440px; margin: 0 auto; }
.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 16px; align-self: start; position: sticky; top: 16px; }
.cat h3 { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 0 0 6px; }
.cat + .cat { margin-top: 14px; }
.feature { display: block; width: 100%; text-align: left; padding: 9px 10px; margin-bottom: 4px; border-radius: 8px; border: 1px solid transparent; background: transparent; font: inherit; color: var(--text); cursor: pointer; }
.feature:hover { background: var(--bg); }
.feature.active { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 8%, #fff); font-weight: 600; }
.ask-bar { margin-top: 16px; background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.ask-row { display: flex; flex-wrap: wrap; gap: 10px; }
.ask-row .btn { padding: 12px 14px; font-size: 15px; white-space: nowrap; flex: 1 0 auto; }
.ask-row .ask-btn { flex-grow: 2; }
.ask-btn { font-size: 16px; }
.typed { display: flex; gap: 6px; }
.ask-bar .fine { margin: 0; }

.stage { min-width: 0; position: relative; }
/* Desktop: size the video by the window height too, so the video AND the
   ask bar under it fit on screen together (350px = top bar, heading, ask bar). */
@media (min-width: 861px) {
  .stage { width: 100%; max-width: max(520px, calc((100vh - 350px) * 16 / 9)); justify-self: start; }
}
.feature-head { margin-bottom: 12px; }
.crumb { font-size: 13px; color: var(--muted); }
.video-wrap { position: relative; width: 100%; aspect-ratio: 16 / 9; background: #0b0f14; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.video-wrap iframe, #player, #player > * { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }
.video-wrap .vidyard-player-container { position: absolute !important; inset: 0; }
.manual-pause { position: absolute; left: 12px; bottom: 12px; margin: 0; background: rgba(15, 23, 42, .82); color: #fff; font-size: 13px; padding: 6px 10px; border-radius: 6px; }
.empty-stage { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: #cbd5e1; padding: 24px; text-align: center; }

/* Agent panel: centered dialog over a dimmed page */
.agent-backdrop { position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 9; }
.agent { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); width: min(600px, calc(100% - 32px)); max-height: calc(100vh - 32px); overflow: auto; background: var(--card); border-radius: 16px; box-shadow: 0 24px 60px rgba(15, 23, 42, .35); padding: 28px 28px 24px; z-index: 10; }
.agent-close { position: absolute; top: 12px; right: 12px; font-size: 18px; }
.agent-head { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 4px; margin-bottom: 18px; }
.agent-head .orb { margin-bottom: 10px; }
.agent-name { font-weight: 700; font-size: 18px; }
.agent-status { font-size: 14px; color: var(--muted); min-height: 21px; }
.orb { width: 112px; height: 112px; flex: none; border-radius: 50%; overflow: hidden; background: radial-gradient(circle at 35% 35%, color-mix(in srgb, var(--accent) 55%, #fff), var(--brand) 70%); box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); }
.orb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.orb.listening { animation: ring 1.3s infinite; }
.orb.thinking { animation: breathe 1s ease-in-out infinite; }
.orb.speaking { animation: ring .7s infinite; }
@keyframes ring { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent) 60%, transparent); } 100% { box-shadow: 0 0 0 20px transparent; } }
@keyframes breathe { 50% { transform: scale(.92); opacity: .8; } }
@keyframes spin { to { transform: rotate(360deg); } }
.transcript { max-height: 40vh; overflow: auto; font-size: 16px; line-height: 1.6; }
.transcript .q { color: var(--muted); font-size: 15px; margin-bottom: 8px; }
.transcript .a { white-space: pre-wrap; }
.agent-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 18px; }
.agent-typed { margin-top: 12px; }
.cta-card { margin-top: 18px; border-top: 1px solid var(--line); padding-top: 14px; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; align-items: center; }
.cta-card > div { width: 100%; text-align: center; font-size: 13px; color: var(--muted); }

.badge { text-align: center; font-size: 12px; color: var(--muted); padding: 8px 0 20px; }
.badge a { color: var(--muted); }

dialog { border: 0; border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; width: min(400px, calc(100% - 32px)); }
dialog::backdrop { background: rgba(15, 23, 42, .45); }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; }
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); background: #1f2933; color: #fff; padding: 10px 16px; border-radius: 8px; font-size: 14px; z-index: 20; max-width: calc(100% - 32px); }

@media (max-width: 860px) {
  .layout { grid-template-columns: 1fr; padding: 12px 16px; }
  .panel { position: static; order: 2; }
  .stage { order: 1; }
  .agent { padding: 24px 18px 18px; }
  .orb { width: 88px; height: 88px; }
  .topbar { padding: 10px 16px; }
  .ask-row .ask-btn { flex-basis: 100%; }
  .ask-row .btn { padding: 10px; font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .orb, .spinner { animation: none !important; } }
