/* THE TABLET TELEPROMPTER (Basecamp 10495670549).
   views/prompter.js — the tablet under the glass — and the phone's tablet
   card and status line in views/capture.js. */

/* ---------- the phone ---------- */

.capture .tablet-card-title { font-weight: 600; font-size: 17px; color: var(--heading); }
.capture .tablet-card-text { margin: 0; font-size: 15px; line-height: 1.45; color: var(--text); }
.capture .tablet-card-address { color: var(--heading); word-break: break-all; }
.capture .tablet-card { display: flex; flex-direction: column; gap: 12px; }
.capture .tablet-card[hidden] { display: none; }
.capture .tablet-btn.on { border-color: var(--ok); color: var(--heading); }
.capture .tablet-status {
  font-size: 12px; color: var(--muted); max-width: 130px; line-height: 1.3;
  padding-left: 2px;
}
.capture .tablet-status[data-state="on"] { color: var(--ok); }
.capture .tablet-status[hidden] { display: none; }

/* ---------- the tablet ---------- */

.tablet-prompter {
  position: fixed; inset: 0; z-index: 50;
  background: #000; color: #fff;
  display: flex; flex-direction: column;
  overflow: hidden;
  --tp-dim: rgba(255, 255, 255, 0.38);
}

/* What is read in the glass. The mirror transform lands on this box, so
   the words, the countdown and the clock all flip together. */
.tablet-prompter .tp-stage {
  position: relative; flex: 1 1 auto; overflow: hidden;
  transform-origin: 50% 50%;
}
.tablet-prompter .tp-words {
  position: absolute; left: 0; right: 0; top: 0;
  padding: 0 7vw;
  font-weight: 600; line-height: 1.32;
  transition: transform 260ms ease-out;
  will-change: transform;
}
.tablet-prompter .tp-title {
  font-size: 0.42em; font-weight: 500; color: var(--tp-dim);
  letter-spacing: 0.02em; margin-bottom: 0.6em;
}
.tablet-prompter .tp-line { margin: 0 0 0.55em; color: rgba(255, 255, 255, 0.82); transition: color 200ms; }
.tablet-prompter .tp-line.is-read { color: var(--tp-dim); }
.tablet-prompter .tp-line.is-now { color: #fff; }
.tablet-prompter .tp-line.tp-cta { font-style: italic; }
.tablet-prompter .tp-line .w-read { opacity: 0.45; }
.tablet-prompter .tp-line .w-now { text-decoration: underline; text-decoration-thickness: 0.06em; text-underline-offset: 0.18em; }
/* The reading mark: a thin bar beside the line being read. */
.tablet-prompter .tp-stage::before {
  content: ""; position: absolute; left: 2.5vw; top: 30%;
  width: 0; height: 0;
  border-top: 14px solid transparent; border-bottom: 14px solid transparent;
  border-left: 18px solid #e0674f;
  transform: translateY(6px);
  z-index: 1;
}
.tablet-prompter[data-stage="waiting"] .tp-stage::before { display: none; }

.tablet-prompter .tp-count {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-size: 34vh; font-weight: 700; color: #fff;
  background: rgba(0, 0, 0, 0.72); z-index: 2;
}
.tablet-prompter .tp-clock {
  position: absolute; right: 3vw; top: 2vh; z-index: 2;
  font: 600 22px/1 ui-monospace, SFMono-Regular, Menlo, monospace;
  color: #e0674f;
}
.tablet-prompter .tp-clock::before { content: "\25CF  "; }
.tablet-prompter [hidden] { display: none !important; }

/* Waiting for the phone, and the two after-the-take notices: not
   mirrored, because they are read on the tablet itself while setting up. */
.tablet-prompter .tp-wait,
.tablet-prompter .tp-notice {
  position: absolute; left: 50%; top: 42%; transform: translate(-50%, -50%);
  width: min(560px, 88vw); text-align: center; z-index: 3;
}
.tablet-prompter .tp-wait h1,
.tablet-prompter .tp-notice h2 {
  margin: 0 0 10px; font-size: 28px; font-weight: 600; color: #fff;
  font-family: inherit; text-transform: none; letter-spacing: normal;
}
.tablet-prompter .tp-wait p,
.tablet-prompter .tp-notice p { margin: 0; font-size: 18px; line-height: 1.45; color: rgba(255, 255, 255, 0.75); }
.tablet-prompter .tp-notice {
  background: #17140f; border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 16px; padding: 28px 28px 24px;
}
.tablet-prompter .tp-notice-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 22px; }
.tablet-prompter .tp-notice .btn {
  min-height: 48px; padding: 0 22px; font-size: 16px; border-radius: 999px;
  background: #fff; color: #000; border: 1px solid #fff; cursor: pointer;
}
.tablet-prompter .tp-notice .btn.secondary { background: transparent; color: #fff; border-color: rgba(255, 255, 255, 0.4); }

/* The controls: pressed directly, never mirrored. They fade back while a
   take or practice run rolls, so the glass shows the words and little else. */
.tablet-prompter .tp-bar {
  flex: 0 0 auto; display: flex; align-items: center; justify-content: space-between;
  gap: 10px; flex-wrap: wrap;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: #0d0c0a; border-top: 1px solid rgba(255, 255, 255, 0.12);
  transition: opacity 300ms;
}
.tablet-prompter.is-rolling .tp-bar { opacity: 0.35; }
.tablet-prompter.is-rolling .tp-bar:hover,
.tablet-prompter.is-rolling .tp-bar:focus-within { opacity: 1; }
.tablet-prompter .tp-group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tablet-prompter .tp-btn {
  min-height: 44px; min-width: 44px; padding: 0 14px;
  border-radius: 999px; border: 1px solid rgba(255, 255, 255, 0.24);
  background: transparent; color: #fff; font: inherit; font-size: 15px;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  cursor: pointer;
}
.tablet-prompter .tp-btn:hover { background: rgba(255, 255, 255, 0.08); }
.tablet-prompter .tp-btn:disabled { opacity: 0.35; cursor: default; }
.tablet-prompter .tp-btn svg { width: 20px; height: 20px; }
.tablet-prompter .tp-icon { padding: 0; width: 44px; }
.tablet-prompter .tp-btn[aria-pressed="true"] { background: #fff; color: #000; border-color: #fff; }
.tablet-prompter .tp-rec { background: #e0674f; border-color: #e0674f; font-weight: 600; padding: 0 22px; }
.tablet-prompter .tp-rec:hover { background: #ea7a63; }
.tablet-prompter .tp-rec.is-on { background: #fff; color: #000; border-color: #fff; }
.tablet-prompter .tp-lamp {
  width: 10px; height: 10px; border-radius: 50%; background: #6b665d; margin-left: 6px;
}
.tablet-prompter .tp-lamp[data-state="on"] { background: #74d194; box-shadow: 0 0 8px #74d194; }
.tablet-prompter .tp-lamp[data-state="waiting"] { background: #d9a441; }
.tablet-prompter .tp-link-text { font-size: 14px; color: rgba(255, 255, 255, 0.7); }

@media (max-width: 720px) {
  .tablet-prompter .tp-bar { justify-content: center; }
  .tablet-prompter .tp-main { order: -1; width: 100%; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .tablet-prompter .tp-words { transition: none; }
}
