/* session-chrome.css — Session progress bar and the overlay chrome (timer, marking chip, close).
   Split from app.module.css; load order in app.html preserves the original cascade. */

/* ---------- overlay chrome ---------- */
/* The top bar is a solid navigation strip: white, a 2px hairline beneath,
   plain bold text controls, the streak in amber at the far end. */
/* The feed's header is the shared .session-header row, floated over the reel:
   only its placement belongs here, never its internal layout. */
.bar {
  position: fixed;
  left: 0;
  right: 0;

  /* On wide viewports the reel content column is 540px centered; the floating
     chrome must track that column, not the window edges, or it ends up marooned
     on the empty background. */
  max-width: 540px;
  margin-inline: auto;
  z-index: 10;
  padding: 0 16px;
  pointer-events: none;
}

.bar.top {
  top: 0;
  min-height: calc(60px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)));
  padding-top: calc(8px + var(--safe-area-inset-top, env(safe-area-inset-top, 0px)));
  padding-bottom: 8px;
  background: var(--paper);
  border-bottom: 2px solid var(--line-1);
}

/* The video feed carries its own header (#journeyHeader). */
body.journey-feed .bar.top {
  display: none;
}

.bar > * {
  pointer-events: auto;
}

/* Topic filtering is an icon; the chosen topic is announced, and a filtered
   state is shown in purple rather than spelled out in the header. */
.topic-filter { justify-content: center; width: 44px; min-height: 44px; padding: 0; border: 2px solid var(--line-2); border-radius: 13px; background: var(--paper); color: var(--ink-2); }
.topic-filter:hover { background: var(--panel); }
.topic-filter .filter-icon { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.topic-filter.is-filtered { color: var(--m-v); border-color: var(--m-v-lip); background: color-mix(in srgb, var(--m-v) 14%, var(--paper)); }

.chip {
  display: inline-flex;
  gap: 6px;
  align-items: center;
  min-height: 40px;
  padding: 4px 8px;
  border-radius: 8px;
  background: none;
  color: var(--ink-2);
  font-size: 1rem;
  font-weight: 700;
  transition:
    background 0.12s var(--ease),
    transform 0.08s var(--ease);
}

.chip:active {
  transform: translateY(1px);
  background: var(--panel-2);
}

/* A readout, not a control: it never did anything when pressed, so it no
   longer offers the press. */
.chip.streak:active { transform: none; background: none; }

.chip.streak {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--ink-3);
}

.chip.streak svg {
  width: 24px;
  height: 24px;
}

.chip.streak:not(.lit) svg {
  filter: grayscale(1);
  opacity: 0.45;
}

/* The countdown sits at the right end of the header, in red so it always reads as
   time, and matches the cross's 44px height so the two share a centre line. */
.chip.timer {
  gap: 5px;
  min-height: 44px;
  font-variant-numeric: tabular-nums;
  font-size: 1.0625rem;
  font-weight: 800;
  line-height: 1;
  color: var(--countdown);
}

.chip.timer svg {
  width: 19px;
  height: 19px;
  flex: none;
  fill: none;
  stroke: currentColor;
}

/* The clock sits on the header's centre line with the cross. Digits carry no
   descenders, so their ink reads high beside it; 2px settles them. */
.chip.timer > span {
  position: relative;
  top: 2px;
}

.chip.timer:active {
  transform: translateY(1px);
}

.chip.timer.low {
  color: var(--countdown);
  animation: tock 1s var(--ease) infinite;
}

@keyframes tock {
  50% {
    transform: translateX(-50%) scale(1.06);
  }
}

.pop {
  animation: pop 0.4s var(--ease);
}

@keyframes pop {
  40% {
    transform: scale(1.28) rotate(-4deg);
  }
}
