/* ICRT voice reporter.
   A dark instrument panel: the waveform and the clock are the interface, the
   controls are one row of circles beneath them. Recording is red because that
   is universal; the station's orange marks progress and the station's blue is
   the commit action. */

/* A class that sets `display` BEATS the hidden attribute, whose only power is
   the UA stylesheet's display:none. Every state in this panel is toggled with
   `hidden`, so without this the review form and all four transport buttons show
   at once, in every state. */
.cwv [hidden] { display: none !important; }

.cwv {
  --cwv-ink: #0b0d11;
  --cwv-rec: #e2231a;
  --cwv-mark: #f87800;
  --cwv-go: var(--icrt-accent, #1160d4);
  max-width: 44rem;
  margin: 1.75rem auto;
  font-size: 15px;
}

/* --- deck ----------------------------------------------------------------- */

.cwv__deck {
  background: var(--cwv-ink);
  border-radius: 18px;
  padding: 1.35rem 1.5rem 1.5rem;
  color: #fff;
  box-shadow: 0 18px 40px -22px rgba(0, 0, 0, .7);
}

.cwv__meta { display: flex; align-items: center; gap: .55rem; margin-bottom: .9rem; }

.cwv__dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: #454b57;
  transition: background .2s ease;
}

.cwv[data-state="recording"] .cwv__dot {
  background: var(--cwv-rec);
  animation: cwv-pulse 1.6s infinite;
}

.cwv[data-state="paused"] .cwv__dot { background: var(--cwv-mark); }

@keyframes cwv-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(226, 35, 26, .7); }
  70%  { box-shadow: 0 0 0 9px rgba(226, 35, 26, 0); }
  100% { box-shadow: 0 0 0 0 rgba(226, 35, 26, 0); }
}

@media (prefers-reduced-motion: reduce) { .cwv__dot { animation: none; } }

.cwv__status {
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #98a0ad;
}

.cwv__wave { display: block; width: 100%; height: 96px; }

/* --- clock ---------------------------------------------------------------- */

.cwv__readout { margin: .5rem 0 1.15rem; }

.cwv__time {
  margin: 0 0 .55rem;
  font-size: 2.6rem;
  font-weight: 300;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.cwv__max { font-size: 1rem; color: #6d7484; font-weight: 400; }

.cwv__bar { height: 3px; border-radius: 2px; background: #222833; overflow: hidden; }

.cwv__bar-fill {
  display: block;
  width: 0;
  height: 100%;
  background: var(--cwv-mark);
  transition: width .2s linear;
}

/* --- controls ------------------------------------------------------------- */

.cwv__controls { display: flex; align-items: center; gap: .7rem; }

.cwv__btn {
  position: relative;
  /* Without this the flex row stretches them and every "circle" is an ellipse. */
  flex: 0 0 auto;
  box-sizing: border-box;
  padding: 0;
  width: 54px; height: 54px;
  border: 0;
  border-radius: 50%;
  background: #1b2029;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background .15s ease, transform .12s ease;
}

.cwv__btn:hover { background: #262d38; }
.cwv__btn:active { transform: scale(.95); }
.cwv__btn:focus-visible { outline: 2px solid var(--cwv-go); outline-offset: 3px; }

.cwv__btn--record { background: var(--cwv-rec); width: 62px; height: 62px; }
.cwv__btn--record:hover { background: #c81c14; }
.cwv__btn-mark { width: 20px; height: 20px; border-radius: 50%; background: #fff; }

/* Pause: two bars. Stop: a square. Again: a rotating arrow. Drawn in CSS so the
   panel needs no icon font or sprite. */
.cwv__btn--pause::before,
.cwv__btn--pause::after {
  content: ""; position: absolute;
  width: 5px; height: 20px; border-radius: 1px; background: #fff;
}
.cwv__btn--pause::before { transform: translateX(-6px); }
.cwv__btn--pause::after  { transform: translateX(6px); }

.cwv__btn--stop::before {
  content: ""; width: 18px; height: 18px; border-radius: 3px; background: #fff;
}

.cwv__btn--again::before {
  content: "";
  width: 18px; height: 18px;
  border: 2.5px solid #fff;
  border-right-color: transparent;
  border-radius: 50%;
  transform: rotate(-45deg);
}

/* --- review --------------------------------------------------------------- */

.cwv__review {
  margin-top: 1.1rem;
  padding: 1.35rem 1.5rem 1.5rem;
  border: 1px solid var(--icrt-line, #e3e5ea);
  border-radius: 14px;
  background: var(--icrt-paper, #fff);
  display: flex;
  flex-direction: column;
  gap: .9rem;
}

.cwv__playback { width: 100%; }

.cwv__field { display: flex; flex-direction: column; gap: .3rem; }

.cwv__label {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: #6b727c;
}

.cwv__input {
  width: 100%;
  padding: .6rem .75rem;
  border: 1px solid var(--icrt-line, #e3e5ea);
  border-radius: 7px;
  font: inherit;
  font-size: .95rem;
}

.cwv__input:focus { outline: 2px solid var(--cwv-go); outline-offset: 1px; border-color: transparent; }
.cwv__input--area { resize: vertical; min-height: 4.5rem; }

.cwv__note { margin: 0; font-size: .8rem; color: #6b727c; }

.cwv__submit {
  align-self: flex-start;
  padding: .7rem 1.35rem;
  border: 0;
  border-radius: 7px;
  background: var(--cwv-go);
  color: #fff;
  font-weight: 600;
  font-size: .92rem;
  cursor: pointer;
}

.cwv__submit:hover { background: var(--icrt-accent-dark, #0c47a0); }
.cwv__submit[disabled] { opacity: .55; cursor: default; }

/* --- messages and the signed-out gate ------------------------------------- */

.cwv__message { margin: .9rem 0 0; font-size: .88rem; min-height: 1.2em; }
.cwv__message.is-error   { color: #b42318; }
.cwv__message.is-success { color: #1a8f4c; }

.cwv__gate {
  padding: 2rem 1.75rem;
  border-radius: 16px;
  text-align: center;
  background:
    radial-gradient(120% 180% at 50% 0%, rgba(17, 96, 212, .4) 0%, transparent 65%),
    linear-gradient(140deg, #0e1522 0%, #0a0d13 100%);
  color: #fff;
}

.cwv__gate-title { margin: 0 0 .4rem; font-size: 1.15rem; font-weight: 700; }
.cwv__gate-body { margin: 0 0 1.1rem; font-size: .92rem; color: #aeb6c2; }

.cwv__gate-cta {
  display: inline-block;
  padding: .6rem 1.2rem;
  border-radius: 6px;
  background: var(--cwv-go);
  color: #fff;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
}

@media (max-width: 560px) {
  .cwv__time { font-size: 2rem; }
  .cwv__wave { height: 74px; }
}

/* --- page hero -----------------------------------------------------------
   The section also carries the theme's .icrt-phero, which supplies the
   full-bleed breakout, the background and the text colours. Only the
   two-column layout and the deck still belong here — restating the rest would
   mean two copies of the hero drifting apart. */

.cwv-hero__inner {
  max-width: 68rem;
  margin: 0 auto;
  display: grid;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: center;
}

@media (min-width: 900px) {
  .cwv-hero__inner { grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); }
}

/* --- the still -----------------------------------------------------------
   Decorative (aria-hidden in the markup) and deliberately without hover or
   focus affordances: it must never read as a working control. */

.cwv-hero__deck {
  background: linear-gradient(170deg, #161d2b 0%, #0d121c 100%);
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 1.1rem;
  padding: 1.5rem 1.4rem 1.35rem;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.45);
}

.cwv-hero__deckhead {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.cwv-hero__dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: #f0b429;
  box-shadow: 0 0 0 3px rgba(240, 180, 41, 0.18);
}

.cwv-hero__label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #f0b429;
}

.cwv-hero__clock {
  margin: 0.75rem 0 0;
  font-size: clamp(2.4rem, 6vw, 3.4rem);
  font-weight: 300;
  line-height: 1;
  letter-spacing: -0.02em;
  color: #fff;
  font-variant-numeric: tabular-nums;
}

.cwv-hero__ceiling { font-size: 0.34em; font-weight: 600; color: var(--icrt-muted); letter-spacing: 0; }

.cwv-hero__wave {
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 4.25rem;
  margin: 1.15rem 0 1.35rem;
}

.cwv-hero__bar {
  flex: 1 1 0;
  min-height: 3px;
  border-radius: 2px;
  background: linear-gradient(180deg, #4a8ff0 0%, #1160d4 100%);
}

.cwv-hero__transport {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
}

.cwv-hero__key {
  /* flex-none: in a flex row these stretch into ovals without it. */
  flex: 0 0 auto;
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.cwv-hero__key--rec {
  width: 3.5rem;
  height: 3.5rem;
  background: linear-gradient(180deg, #e8503f 0%, #c8321f 100%);
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: 0 0 0 6px rgba(232, 80, 63, 0.14);
}
