/* ---------- Rehearse: the clock, run-throughs and the reading view ---------- */

.stage-bar {
  position: sticky;
  top: 3.7rem;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem;
  max-width: calc(var(--measure) + 5rem);
  margin: 0 auto 0.75rem;
  padding: 0.6rem 0.9rem 0.6rem 0.6rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--sheet);
  box-shadow: var(--shadow);
}

.go {
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
}

.go svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: currentColor;
}

.go .i-stop,
.rehearse.running .go .i-play {
  display: none;
}

.rehearse.running .go .i-stop {
  display: block;
}

.clock-wrap {
  flex: 1;
  min-width: 9rem;
}

.clock {
  font: 500 1.6rem/1.1 var(--sans);
  font-variant-numeric: tabular-nums;
}

.clock .of {
  color: var(--ink-faint);
  font-size: 1rem;
  font-weight: 400;
}

.progress {
  position: relative;
  height: 4px;
  margin-top: 0.4rem;
  border-radius: 2px;
  background: var(--rule);
  overflow: hidden;
}

#progress-bar {
  width: 0;
  height: 100%;
  background: var(--accent);
}

.over #progress-bar {
  background: var(--danger);
}

#progress-target {
  position: absolute;
  top: 0;
  width: 2px;
  height: 100%;
  background: var(--ink);
}

.stage-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
}

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.92rem;
  cursor: pointer;
  user-select: none;
}

.toggle input {
  width: 1rem;
  height: 1rem;
  accent-color: var(--accent);
}

.size {
  display: flex;
}

.size .icon-btn {
  font-family: var(--serif);
  line-height: 1;
}

#size-down {
  font-size: 0.85rem;
}

#size-up {
  font-size: 1.25rem;
}

/* The tip about recording yourself */

.record-tip {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  max-width: calc(var(--measure) + 5rem);
  margin: 0 auto 0.75rem;
  padding: 0.55rem 0.5rem 0.55rem 1rem;
  border-radius: var(--radius-sm);
  background: var(--accent-soft);
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.record-tip span {
  flex: 1;
  padding-top: 0.3rem;
}

.record-tip .icon-btn {
  flex: none;
  min-width: 2rem;
  height: 2rem;
}

.record-tip .icon-btn svg {
  width: 1rem;
  height: 1rem;
}

/* Run-throughs */

.takes-wrap {
  max-width: calc(var(--measure) + 5rem);
  margin: 0 auto;
}

.takes {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 0.75rem;
  padding: 0;
  list-style: none;
}

.take {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.3rem 0.4rem 0.3rem 0.8rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--sheet);
  font-size: 0.88rem;
  font-variant-numeric: tabular-nums;
}

.take-diff {
  color: var(--ink-faint);
}

.take-diff.over {
  color: var(--danger);
}

.take .icon-btn {
  min-width: 1.9rem;
  height: 1.9rem;
}

.take .icon-btn svg {
  width: 1rem;
  height: 1rem;
}

/* The offer of Emma's notes, under the run-throughs */

.review-offer {
  margin: -0.25rem 0 0.9rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.review-offer a {
  color: var(--accent);
  font-weight: 500;
  text-underline-offset: 3px;
}

/* The reading view */

.reading {
  font-size: var(--reading-size);
  line-height: 2.2;
}

.stage {
  padding-top: 3rem;
  padding-bottom: 40vh; /* so the last lines can sit high on the screen */
}

.reading .w.now {
  background: var(--guide);
  box-shadow:
    0.1em 0 0 var(--guide),
    -0.1em 0 0 var(--guide);
}

.reading .w.past {
  opacity: 0.55;
}

@media (max-width: 760px) {
  .stage-bar {
    top: 6.4rem;
    gap: 0.6rem;
    border-radius: var(--radius);
  }

  .stage-options {
    width: 100%;
    justify-content: space-between;
  }
}
