/* FormCoach: the parts of the camera pages that camera.css does not have (panel over the camera, training tiles, the
 * coach figure, the live correction, counters, rest and summary screens). Colors come from camera.css's tokens. */

:root {
  --fc-glass: rgba(16, 16, 18, .58);
  --fc-glass-strong: rgba(10, 10, 12, .78);
  --fc-line: rgba(255, 255, 255, .16);
  --fc-good: #7dffbe;
  --fc-warn: #ffc56b;
  --fc-bad: #ff8a78;
  --fc-blur: blur(18px) saturate(1.2);
}

.fc-body { font-family: var(--cq-camera-font); color: var(--cq-camera-on-media); }
.fc-body [hidden] { display: none !important; }
/* look.css colors headings and links for white pages: over the camera they are white */
.fc-body h1, .fc-body h2, .fc-body h3, .fc-body b { color: var(--cq-camera-on-media); }
.fc-body a.cq-camera-link, .fc-body button.cq-camera-link { color: var(--cq-camera-on-media-muted); }
.fc-body a.cq-camera-link:hover, .fc-body button.cq-camera-link:hover { color: var(--cq-camera-on-media); }
.fc-body a.cq-camera-button { color: var(--cq-camera-button-ink); text-decoration: none; }
.fc-body a.cq-camera-button.is-primary { color: #000; }

/* the camera: deeper scrim on the landing and the picker, a moving gradient when there is no camera */
.fc-body .cq-camera-media video { opacity: 0; transition: opacity .6s ease; }
.fc-body.fc-live .cq-camera-media video { opacity: 1; }
.cq-camera:has(.fc-landing, .fc-scroll) .cq-camera-media::after { background: linear-gradient(180deg, rgba(0,0,0,.55) 0%, rgba(0,0,0,.35) 40%, rgba(0,0,0,.7) 100%); }
.fc-face-mode .cq-camera:has(.fc-landing) .cq-camera-media::after { background: rgba(0, 0, 0, .2); }
.fc-fallback {
  position: absolute; inset: 0; z-index: 0; pointer-events: none; opacity: 0; transition: opacity .6s;
  background: radial-gradient(60% 50% at 20% 20%, #2b2f55 0%, transparent 70%), radial-gradient(50% 60% at 80% 70%, #3f1f3a 0%, transparent 70%), #08080b;
  background-size: 160% 160%; animation: fc-drift 18s ease-in-out infinite alternate;
}
.fc-no-camera .fc-fallback { opacity: 1; }
@keyframes fc-drift { from { background-position: 0% 0%; } to { background-position: 100% 100%; } }
@media (prefers-reduced-motion: reduce) { .fc-fallback { animation: none; } }

/* top: the brand on the left, links on the right */
.fc-top { z-index: 5; display: flex; align-items: center; justify-content: space-between; gap: 12px; text-align: left; flex-wrap: wrap; }
.fc-top .cq-camera-status { margin: 0; flex-basis: 100%; text-align: center; }
.fc-top .cq-camera-status:empty { display: none; }
.fc-brand, .fc-brand span { color: var(--cq-camera-on-media); }
.fc-brand .fc-brand-mark { color: #000; }
.fc-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--cq-camera-on-media); text-decoration: none; font-weight: 600; font-size: 18px; letter-spacing: -.01em; }
.fc-brand:hover { color: var(--cq-camera-on-media); }
.fc-brand-mark { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 9px; background: var(--cq-camera-on-media); color: #000; font-size: 13px; font-weight: 700; letter-spacing: 0; }
.fc-links { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; justify-content: flex-end; }
.fc-links .cq-camera-link { font-size: 15px; }
.fc-user { color: var(--cq-camera-on-media-muted); font-size: 14px; }

/* landing: the pitch and the sign-in panel over the camera */
.fc-landing {
  position: absolute; inset: 0; z-index: 3; overflow-y: auto;
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 400px); align-items: center; gap: 48px;
  padding: 96px clamp(16px, 6vw, 96px) 32px;
}
.fc-display { margin: 0 0 16px; font-size: clamp(34px, 5.4vw, 64px); line-height: 1.02; font-weight: 600; letter-spacing: -.03em; color: var(--cq-camera-on-media); }
.fc-lead { margin: 0; max-width: 520px; font-size: 18px; line-height: 1.5; color: var(--cq-camera-on-media-muted); }
.fc-panel {
  background: var(--fc-glass); backdrop-filter: var(--fc-blur); -webkit-backdrop-filter: var(--fc-blur);
  border: 1px solid var(--fc-line); border-radius: 18px; padding: 28px;
}
.fc-panel h2 { margin: 0 0 4px; font-size: 22px; font-weight: 600; color: var(--cq-camera-on-media); }
.fc-panel p { margin: 0 0 18px; font-size: 14px; line-height: 1.45; color: var(--cq-camera-on-media-muted); }
.fc-panel label { display: block; margin: 0 0 14px; font-size: 14px; font-weight: 500; color: var(--cq-camera-on-media); }
.fc-panel input {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px; font: inherit; font-size: 16px;
  color: var(--cq-camera-on-media); background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .22); border-radius: 10px;
}
.fc-panel input:focus { outline: 0; border-color: var(--cq-camera-on-media); box-shadow: 0 0 0 1px var(--cq-camera-on-media); }
.fc-panel .cq-camera-button { width: 100%; justify-content: center; }
.fc-panel .cq-camera-button.is-primary, .fc-panel a.cq-camera-button.is-primary { background: var(--cq-camera-on-media); color: #000; }
.fc-panel .cq-camera-error { margin: 10px 0 0; min-height: 0; color: var(--fc-bad); }
.fc-panel .cq-camera-error:empty { display: none; }
.fc-panel .fc-hint { margin: -4px 0 14px; font-size: 13px; }
.fc-switch { margin: 16px 0 0 !important; text-align: center; font-size: 14px; }
.fc-switch .cq-camera-link { color: var(--cq-camera-on-media); text-decoration: underline; text-underline-offset: 3px; }
.fc-panel-actions { display: grid; gap: 10px; justify-items: center; }
.fc-guest { margin: 14px 0 0; text-align: center; }
.fc-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; margin: 0 0 22px; background: rgba(255, 255, 255, .08); border-radius: 12px; }
.fc-tabs button { padding: 9px 8px; border: 0; border-radius: 9px; background: transparent; color: var(--cq-camera-on-media-muted); font: inherit; font-size: 14px; font-weight: 500; cursor: pointer; }
.fc-tabs button.is-active { background: var(--cq-camera-on-media); color: #000; }
.fc-tabs button:focus-visible { outline: 2px solid var(--cq-camera-on-media); outline-offset: 2px; }

/* face sign-in: the oval in the middle, the panel moves out of the way */
.fc-oval { z-index: 2; }
.fc-face-mode .fc-pitch { visibility: hidden; }

/* training picker */
.fc-scroll { position: absolute; inset: 0; z-index: 3; overflow-y: auto; padding: 88px clamp(16px, 5vw, 72px) 48px; }
.fc-scroll > .fc-top { position: fixed; top: 0; left: 0; right: 0; padding: 18px clamp(16px, 5vw, 72px); background: linear-gradient(180deg, rgba(0,0,0,.6), transparent); }
.fc-heading { margin: 8px 0 6px; font-size: clamp(28px, 4vw, 44px); font-weight: 600; letter-spacing: -.02em; }
.fc-sub { margin: 0 0 28px; color: var(--cq-camera-on-media-muted); font-size: 16px; max-width: 640px; }
.fc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.fc-tile {
  display: flex; flex-direction: column; gap: 8px; min-height: 190px; padding: 20px; border-radius: 16px; text-decoration: none;
  color: var(--cq-camera-on-media); background: var(--fc-glass); border: 1px solid var(--fc-line);
  backdrop-filter: var(--fc-blur); -webkit-backdrop-filter: var(--fc-blur); transition: transform .15s ease, border-color .15s ease, background .15s ease;
}
.fc-tile:hover, .fc-tile:focus-visible { color: var(--cq-camera-on-media); transform: translateY(-2px); border-color: rgba(255,255,255,.5); background: var(--fc-glass-strong); outline: 0; }
.fc-tile h3 { margin: 0; font-size: 21px; font-weight: 600; }
.fc-tile p { margin: 0; color: var(--cq-camera-on-media-muted); font-size: 14px; line-height: 1.45; }
.fc-tile .fc-moves { font-size: 13px; color: rgba(255,255,255,.6); }
.fc-meta { display: flex; gap: 12px; align-items: center; margin-top: auto; font-size: 13px; color: var(--cq-camera-on-media-muted); }
.fc-dots { display: inline-flex; gap: 3px; }
.fc-dots i { width: 7px; height: 7px; border-radius: 50%; background: rgba(255,255,255,.25); }
.fc-dots i.on { background: var(--cq-camera-on-media); }
.fc-go { margin-left: auto; font-weight: 600; color: var(--cq-camera-on-media); }
.fc-card {
  margin: 28px 0 0; padding: 20px; border-radius: 16px; background: var(--fc-glass); border: 1px solid var(--fc-line);
  backdrop-filter: var(--fc-blur); -webkit-backdrop-filter: var(--fc-blur); display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
}
.fc-card h2 { margin: 0 0 2px; font-size: 18px; font-weight: 600; }
.fc-card p { margin: 0; font-size: 14px; color: var(--cq-camera-on-media-muted); }
.fc-card > div { flex: 1 1 260px; }
.fc-card .cq-camera-actions { justify-content: flex-end; }

/* a sheet over the camera (enrolment, rest, summary): glass, white type */
.fc-sheet {
  position: absolute; z-index: 6; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 32px); overflow: auto; padding: 28px;
  background: var(--fc-glass-strong); border: 1px solid var(--fc-line); border-radius: 18px; color: var(--cq-camera-on-media);
  backdrop-filter: var(--fc-blur); -webkit-backdrop-filter: var(--fc-blur); text-align: center;
}
.fc-sheet h2 { margin: 0 0 6px; font-size: 24px; font-weight: 600; }
.fc-sheet p { margin: 0 0 16px; color: var(--cq-camera-on-media-muted); font-size: 15px; line-height: 1.45; }
.fc-sheet .cq-camera-actions { justify-content: center; }
.fc-sheet .cq-camera-error { color: var(--fc-bad); margin: 12px 0 0; }
.fc-sheet .cq-camera-error:empty { display: none; }
.fc-sheet ol, .fc-sheet ul { text-align: left; margin: 0 0 18px; padding-left: 20px; color: var(--cq-camera-on-media-muted); font-size: 15px; line-height: 1.6; }
.fc-backdrop { position: absolute; inset: 0; z-index: 5; background: rgba(0, 0, 0, .5); }
.fc-sheet.fc-sheet--low { top: auto; bottom: 24px; transform: translateX(-50%); }

/* training: the coach figure, the counter, the live correction */
.fc-train-top { z-index: 4; }
.fc-train-title { margin: 0; font-size: clamp(20px, 3vw, 28px); font-weight: 600; letter-spacing: -.01em; }
.fc-train-sub { margin: 2px 0 0; font-size: 14px; color: var(--cq-camera-on-media-muted); }
.fc-coach {
  position: absolute; z-index: 3; right: 16px; top: 112px; width: clamp(150px, 22vw, 240px);
  border-radius: 16px; overflow: hidden; background: var(--fc-glass); border: 1px solid var(--fc-line);
  backdrop-filter: var(--fc-blur); -webkit-backdrop-filter: var(--fc-blur);
}
.fc-coach canvas { display: block; width: 100%; aspect-ratio: 1 / 1; }
.fc-coach p { margin: 0; padding: 8px 12px 12px; font-size: 12px; line-height: 1.4; color: var(--cq-camera-on-media-muted); }
.fc-coach-label { position: absolute; left: 12px; top: 10px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--cq-camera-on-media-muted); }
.fc-counter { position: absolute; z-index: 3; left: 16px; top: 112px; display: grid; gap: 10px; }
.fc-stat {
  min-width: 112px; padding: 12px 16px; border-radius: 16px; background: var(--fc-glass); border: 1px solid var(--fc-line);
  backdrop-filter: var(--fc-blur); -webkit-backdrop-filter: var(--fc-blur);
}
.fc-stat b { display: block; font-size: clamp(30px, 5vw, 48px); line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.fc-stat span { display: block; margin-top: 4px; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--cq-camera-on-media-muted); }
.fc-stat--small b { font-size: 24px; }
.fc-bar { height: 4px; margin-top: 8px; border-radius: 4px; background: rgba(255,255,255,.18); overflow: hidden; }
.fc-bar i { display: block; height: 100%; width: 0; background: var(--cq-camera-on-media); transition: width .25s linear; }
.fc-cue {
  position: absolute; z-index: 4; left: 50%; bottom: 104px; transform: translateX(-50%); max-width: min(680px, calc(100vw - 32px));
  padding: 12px 20px; border-radius: 999px; font-size: clamp(16px, 2.4vw, 22px); font-weight: 600; text-align: center;
  background: var(--fc-glass-strong); border: 1px solid var(--fc-line); backdrop-filter: var(--fc-blur); -webkit-backdrop-filter: var(--fc-blur);
  transition: background .2s, color .2s;
}
.fc-cue:empty { display: none; }
.fc-cue.is-good { color: #002b16; background: var(--fc-good); border-color: transparent; }
.fc-cue.is-fix { color: #2b1700; background: var(--fc-warn); border-color: transparent; }
.fc-cue.is-info { color: var(--cq-camera-on-media); }
.fc-train-bottom { z-index: 4; }
.fc-train-bottom button[aria-pressed="false"] { opacity: .7; }
.fc-big { display: block; margin: 4px 0 10px; font-size: 72px; line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums; }
.fc-next { display: flex; gap: 14px; align-items: center; text-align: left; margin: 0 0 18px; padding: 12px; border-radius: 14px; background: rgba(255,255,255,.07); }
.fc-next canvas { width: 96px; height: 96px; flex: none; }
.fc-next b { display: block; font-size: 17px; }
.fc-next span { font-size: 13px; color: var(--cq-camera-on-media-muted); }
.fc-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0 0 18px; }
.fc-summary div { padding: 12px 6px; border-radius: 12px; background: rgba(255,255,255,.07); }
.fc-summary b { display: block; font-size: 26px; font-weight: 600; }
.fc-summary span { font-size: 12px; color: var(--cq-camera-on-media-muted); text-transform: uppercase; letter-spacing: .06em; }
.fc-sheet a.cq-camera-button { text-decoration: none; }
.fc-sheet .cq-camera-button.is-primary { background: var(--cq-camera-on-media); color: #000; }
.fc-sheet .cq-camera-button:not(.is-primary) { background: rgba(255, 255, 255, .14); color: var(--cq-camera-on-media); }

/* phones */
@media (max-width: 760px) {
  .fc-landing { grid-template-columns: minmax(0, 1fr); align-content: start; gap: 24px; padding-top: 84px; }
  .fc-lead { font-size: 16px; }
  .fc-face-mode .fc-pitch { display: none; }
  .fc-face-mode .fc-landing { align-content: end; }
  .fc-panel { padding: 22px; }
  .fc-coach { top: auto; bottom: 172px; right: 12px; width: 116px; }
  .fc-scroll { padding-top: 16px; }
  .fc-scroll > .fc-top { position: static; padding: 0 0 8px; background: none; }
  .fc-coach p { display: none; }
  .fc-counter { top: 104px; left: 12px; gap: 8px; }
  .fc-stat { min-width: 84px; padding: 8px 12px; }
  .fc-stat b { font-size: 30px; }
  .fc-stat--small b { font-size: 20px; }
  .fc-cue { bottom: 84px; width: calc(100vw - 24px); border-radius: 14px; padding: 10px 14px; font-size: 16px; }
  .fc-train-bottom .cq-camera-actions { flex-wrap: nowrap; width: 100%; gap: 6px; }
  .fc-train-bottom .cq-camera-actions button { flex: 1 1 0; min-width: 0; padding-left: 4px; padding-right: 4px; font-size: 14px; }
  .fc-train-top .fc-links { display: none; }
  .fc-train-top { padding-right: 16px; }
  .fc-big { font-size: 56px; }
}
