/* present.css — Present mode (plan 2026-09-30). The customer's screen on the
   in-store kiosk: portrait 1080×1920 touch first, also 1440×900 and 768.
   Every target is at least 44px; cards are at least 120px. Existing tokens
   from deckcalcshell.css (--ink, --line, --bg, --surface, --accent,
   --tuds-navy, --font-family). */

body.present-mode { overflow: hidden; }
/* The rep's app stays laid out underneath (no resize churn) but is not seen
   or reachable while Present is up. */
body.present-mode .app-shell,
body.present-mode #dashboardPage { visibility: hidden; }

.present-root {
  position: fixed;
  inset: 0;
  z-index: 9500;
  background: var(--bg, #F6F8F9);
  color: var(--ink, #16222B);
  font-family: var(--font-family, system-ui, sans-serif);
  font-size: clamp(16px, min(2.1vw, 1.25vh), 26px);
  line-height: 1.35;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: auto minmax(0, 56fr) minmax(0, 44fr);
  grid-template-areas: "top" "stage" "panel";
  overflow: hidden;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
}
.present-root[hidden] { display: none; }

/* ── top bar ─────────────────────────────────────────────────────────────── */
.present-top {
  grid-area: top;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 0.75em;
  padding: 0.6em 1em;
  background: var(--tuds-navy, #133A52);
  color: #fff;
  min-height: 72px;
}
.present-logo { height: 2.4em; max-height: 64px; width: auto; justify-self: start; }
.present-title { margin: 0; font-size: 1.45em; font-weight: 700; text-align: center; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.present-done { justify-self: end; }

/* ── buttons ─────────────────────────────────────────────────────────────── */
.present-btn {
  min-height: 56px;
  min-width: 88px;
  padding: 0.55em 1.2em;
  border-radius: 999px;
  border: 2px solid var(--line, #E3E8EB);
  background: var(--surface, #fff);
  color: var(--ink, #16222B);
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  touch-action: manipulation;
}
.present-top .present-btn { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: rgba(255, 255, 255, 0.5); }
.present-primary { background: var(--accent, #2D6A6A); border-color: var(--accent, #2D6A6A); color: #fff; }
.present-quiet { border-color: transparent; background: transparent; text-decoration: underline; }
.present-btn:active, .present-card:active, .present-pill:active { transform: scale(0.98); }

/* ── the 3D stage ────────────────────────────────────────────────────────── */
.present-stage-wrap { grid-area: stage; position: relative; min-height: 0; background: #dfe7ea; }
.present-stage { position: absolute; inset: 0; touch-action: none; }
.present-stage canvas { width: 100% !important; height: 100% !important; touch-action: none; }
.present-fallback { width: 100%; height: 100%; object-fit: contain; background: #fff; }
.present-stage-hint {
  position: absolute; top: 0.6em; left: 50%; transform: translateX(-50%);
  margin: 0; padding: 0.25em 0.8em; border-radius: 999px;
  background: rgba(14, 44, 63, 0.55); color: #fff; font-size: 0.75em; pointer-events: none;
}
.present-no-3d .present-stage-hint, .present-no-3d .present-times, .present-no-3d [data-present-action="reset-view"] { display: none; }
.present-stage-bar {
  position: absolute; left: 0; right: 0; bottom: 0;
  display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5em;
  padding: 0.6em 0.8em;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.35), rgba(0, 0, 0, 0));
}
.present-times { display: flex; gap: 0.4em; }
.present-pill {
  min-height: 52px; min-width: 88px; padding: 0.4em 1em;
  border-radius: 999px; border: 0;
  background: rgba(255, 255, 255, 0.92); color: var(--ink, #16222B);
  font: inherit; font-weight: 600; cursor: pointer; touch-action: manipulation;
}
.present-pill[aria-pressed="true"] { background: var(--tuds-navy, #133A52); color: #fff; }
.present-lights-slot[hidden] { display: none; }

/* ── the panel ───────────────────────────────────────────────────────────── */
.present-panel {
  grid-area: panel;
  min-height: 0;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 1em 1.2em 1.4em;
  background: var(--surface, #fff);
  display: flex; flex-direction: column; gap: 0.8em;
}
.present-h2 { margin: 0; font-size: 1.3em; font-weight: 700; }
.present-h3 { margin: 0 0 0.4em; font-size: 1em; font-weight: 700; color: var(--tuds-navy, #133A52); }
.present-picks { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35em; }
.present-pick { display: grid; grid-template-columns: 1.6em 6.5em minmax(0, 1fr); align-items: center; gap: 0.6em; min-height: 44px; }
.present-swatch { width: 1.6em; height: 1.6em; border-radius: 50%; border: 1px solid rgba(0, 0, 0, 0.15); }
.present-swatch[data-empty] { border: 0; }
.present-pick-label { color: #5b6770; font-weight: 600; }
.present-pick-value { font-weight: 600; }
.present-price { border-top: 2px solid var(--line, #E3E8EB); padding-top: 0.6em; }
.present-total-row { display: flex; justify-content: space-between; align-items: baseline; gap: 1em; }
.present-total-row.is-total { font-size: 1.5em; font-weight: 700; }
.present-total-row small { font-size: 0.6em; font-weight: 600; color: #5b6770; }
.present-preview-line { margin: 0.2em 0 0; font-weight: 700; color: var(--accent, #2D6A6A); }
.present-finance { margin: 0.4em 0 0; font-weight: 600; }
.present-fine { margin: 0.2em 0 0; font-size: 0.62em; color: #5b6770; line-height: 1.4; }
.present-actions { display: flex; flex-wrap: wrap; gap: 0.6em; }
.present-actions .present-primary { flex: 1 1 12em; }

/* ── the Try another look sheet ──────────────────────────────────────────── */
.present-sheet-host {
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 50%;
  z-index: 3;
  background: var(--surface, #fff);
  border-radius: 1.2em 1.2em 0 0;
  box-shadow: 0 -8px 30px rgba(0, 0, 0, 0.25);
  display: flex; flex-direction: column;
}
.present-sheet-host[hidden] { display: none; }
.present-sheet { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.present-sheet-head { display: flex; justify-content: space-between; align-items: center; gap: 1em; padding: 0.8em 1.2em 0.2em; }
.present-sheet-note { margin: 0; padding: 0 1.2em 0.4em; color: #5b6770; font-size: 0.8em; }
.present-sheet-body { overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 0.4em 1.2em 1.6em; display: grid; gap: 1em; }
.present-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(max(120px, 7.5em), 1fr)); gap: 0.6em; }
.present-card {
  min-height: 120px; min-width: 120px;
  display: flex; flex-direction: column; align-items: flex-start; justify-content: flex-start; gap: 0.25em;
  padding: 0.7em;
  border-radius: 0.8em;
  border: 2px solid var(--line, #E3E8EB);
  background: var(--surface, #fff);
  font: inherit; text-align: left; color: inherit; cursor: pointer; touch-action: manipulation;
}
.present-card[hidden] { display: none; }
.present-card.is-current { border-color: var(--accent, #2D6A6A); box-shadow: 0 0 0 3px var(--accent-ring, rgba(45, 106, 106, 0.22)); }
.present-card-swatch { width: 100%; height: 2.2em; border-radius: 0.4em; border: 1px solid rgba(0, 0, 0, 0.12); }
.present-card-name { font-weight: 700; }
.present-card-sub { font-size: 0.75em; color: #5b6770; }
.present-card-price { margin-top: auto; font-weight: 700; }
.present-card-price[data-tone="up"] { color: #8a4b00; }
.present-card-price[data-tone="down"] { color: #1c6b3a; }
.present-card-price[data-tone="current"] { color: var(--accent, #2D6A6A); }
.present-card-price[data-tone="pending"] { color: #9aa5ad; letter-spacing: 0.1em; }
.present-card-price[data-tone="request"] { color: #5b6770; font-weight: 600; font-size: 0.85em; }

/* Sizes win over the kiosk's generic 44px touch minimum (deckcalcshell.css §10). */
#presentRoot .present-btn { min-height: 56px; min-width: 88px; }
#presentRoot .present-pill { min-height: 52px; min-width: 88px; }
#presentRoot .present-card { min-height: 120px; min-width: 120px; }

/* ── overlays: welcome, exit question, loading ───────────────────────────── */
.present-overlay-host:empty { display: none; }
.present-overlay-host { position: absolute; inset: 0; z-index: 5; }
.present-welcome, .present-loading {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1em;
  padding: 2em; text-align: center;
  background: var(--tuds-navy, #133A52); color: #fff; cursor: pointer;
}
.present-loading { position: fixed; z-index: 9501; cursor: default; }
.present-welcome-logo { width: min(60%, 520px); height: auto; }
.present-welcome-big { margin: 0; font-size: 2.2em; font-weight: 700; line-height: 1.15; }
.present-welcome-stars { margin: 0; font-size: 1.1em; }
.present-welcome-stars span { color: #F5B301; }
.present-welcome-tap { margin: 2em 0 0; opacity: 0.8; }
.present-ask-back { position: absolute; inset: 0; background: rgba(14, 44, 63, 0.55); display: flex; align-items: center; justify-content: center; padding: 1em; }
.present-ask { width: min(100%, 36em); background: var(--surface, #fff); border-radius: 1em; padding: 1.4em; display: grid; gap: 0.8em; }
.present-ask-body { margin: 0; }
.present-ask .present-actions { flex-direction: column; }
.present-ask .present-btn { width: 100%; flex: none; }

/* ── landscape (a laptop, 1440×900): 3D on the left, the panel on the right ── */
@media (min-aspect-ratio: 1/1) {
  .present-root {
    grid-template-columns: minmax(0, 1fr) minmax(360px, 34%);
    grid-template-rows: auto minmax(0, 1fr);
    grid-template-areas: "top top" "stage panel";
  }
  .present-sheet-host { left: auto; width: max(360px, 34%); top: 72px; height: auto; border-radius: 0; box-shadow: -8px 0 30px rgba(0, 0, 0, 0.2); }
}
