/* ==========================================================================
   TeamTrek — the idle stretch, and who decides about it
   --------------------------------------------------------------------------
   The hero figure on the idle time tracking page: one day with an idle
   stretch in it, and the card the person it belongs to is handed.

   Every other page on the site says idle time is "marked separately" in one
   line. That line is the easy half. This page is about the half after it --
   who is shown the stretch, who keeps or discards it, what a note is for,
   and what the day's total says once they have decided -- so the figure has
   to carry a decision rather than a measurement.

   1056 by 482, like every other hero figure on the site.

   Drawn in CSS. Nothing here is an image or a screenshot of the product.
   ========================================================================== */

.idle {
  width: 100%; max-width: 66rem; margin-inline: auto;
  padding: 1.25rem 1.5rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-xl);
  background: #fff;
  /* Heavier than the shared shadow: the panel straddles the dark band and
     the dome, and a light shadow over the dark half disappears. */
  box-shadow: 0 30px 80px rgba(8, 40, 36, .28);
  text-align: left;
  display: flex; flex-direction: column;
}

/* ------------------------------------------------------------- the head */
.idle__head {
  display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1rem;
  padding-bottom: .875rem;
  border-bottom: 1px solid var(--neutral-200);
}
.idle__who { font-size: .9375rem; font-weight: 700; color: var(--neutral-900); }
.idle__day { font-size: .8125rem; color: var(--neutral-500); }
.idle__state {
  display: flex; align-items: center; gap: .5rem;
  font-size: .6875rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--primary-700);
}
.idle__total {
  margin-left: auto;
  font-size: .8125rem; color: var(--neutral-600); font-variant-numeric: tabular-nums;
}
.idle__total b { font-weight: 700; color: var(--neutral-900); }

/* ------------------------------------------------------------ the split */
.idle__split {
  flex: 1; min-height: 0;
  margin-top: .875rem;
  display: grid; grid-template-columns: minmax(0, 1fr) 19rem;
  gap: 1.5rem;
}

/* ------------------------------------------------------------- the day */
.idle__left { min-width: 0; display: flex; flex-direction: column; justify-content: center; gap: .75rem; }

.idle__band {
  display: flex; gap: 3px;
  height: 4.5rem;
  border-radius: var(--r-md);
  background: var(--neutral-50);
  box-shadow: inset 0 0 0 1px var(--neutral-150);
  padding: 4px;
  overflow: hidden;
}
.idle__seg {
  position: relative;
  flex: 0 0 var(--w); min-width: 2px;
  border-radius: var(--r-xs);
  background: var(--primary-500);
  display: flex; align-items: flex-end;
}
/* The stretch nobody was at the keyboard for. Hatched, because it is time
   that happened and has not been decided about -- which is a different
   thing from time that did not happen. */
.idle__seg--idle {
  background: repeating-linear-gradient(135deg,
    var(--neutral-200) 0 5px, var(--neutral-100) 5px 10px);
  box-shadow: inset 0 0 0 1px var(--neutral-200);
}
/* Waiting on the person. A ring, so the eye goes to the thing the card
   beside it is asking about. */
.idle__seg--idle.is-asking {
  box-shadow: inset 0 0 0 1px var(--neutral-200), 0 0 0 2px #fff, 0 0 0 4px var(--warning-fill);
}
/* Kept: it counts, so it looks like the hours either side of it, with the
   hatch still showing underneath to say where it came from. */
.idle__seg--idle.is-kept {
  background: var(--primary-200);
  box-shadow: inset 0 0 0 1px var(--primary-300);
}
/* Discarded: it leaves the total, and the gap it leaves is the point. */
.idle__seg--idle.is-dropped {
  background: repeating-linear-gradient(135deg,
    var(--neutral-150) 0 5px, var(--neutral-50) 5px 10px);
  box-shadow: inset 0 0 0 1px var(--neutral-150);
  opacity: .6;
}
.idle__seg b {
  padding: .25rem .4375rem;
  font-size: .6875rem; font-weight: 700; color: #fff;
  white-space: nowrap;
}
.idle__seg--idle b { color: var(--neutral-600); }

.idle__axis {
  position: relative; display: block; height: 1.0625rem;
  font-size: .75rem; color: var(--neutral-500);
  font-variant-numeric: tabular-nums;
}
.idle__axis b {
  position: absolute; top: 0;
  left: calc(var(--at) * 1%); transform: translateX(-50%);
  font-weight: inherit; white-space: nowrap;
}
.idle__axis b:first-child { transform: none; }
.idle__axis b:last-child { transform: translateX(-100%); }

/* What the day comes to, which is the figure the decision changes. */
.idle__sums {
  margin: .25rem 0 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}
.idle__sum b {
  display: block;
  font-size: 1.25rem; font-weight: 800; letter-spacing: -.02em;
  color: var(--neutral-900); font-variant-numeric: tabular-nums;
}
.idle__sum span { display: block; margin-top: .125rem; font-size: .8125rem; color: var(--neutral-500); }

/* ------------------------------------------------------------- the card */
/* What the person is actually handed. Not a dialog the page invents: the
   same three things the product asks -- what it saw, what to do with it,
   and whether there is anything to say about it. */
.idle__card {
  display: flex; flex-direction: column;
  padding: 1rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-lg);
  background: var(--neutral-25);
}
.idle__card-head {
  display: flex; align-items: center; gap: .5rem;
  font-size: .6875rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  color: var(--neutral-500);
}
.idle__card-head .icon { flex: none; color: var(--neutral-400); }
.idle__amount {
  margin: .625rem 0 0;
  font-size: 1.75rem; font-weight: 800; letter-spacing: -.02em;
  color: var(--neutral-900); font-variant-numeric: tabular-nums;
}
.idle__when { margin: .125rem 0 0; font-size: .8125rem; color: var(--neutral-500); }

.idle__choices { margin-top: .875rem; display: flex; gap: .5rem; }
.idle__choice {
  flex: 1;
  padding: .5rem .625rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-sm);
  background: #fff;
  font-size: .8125rem; font-weight: 700; color: var(--neutral-700);
  text-align: center;
}
/* The one being taken this time round. */
.idle__choice.is-taken {
  border-color: var(--primary-600); background: var(--primary-600); color: #fff;
}

/* The note. Optional in the product, and optional-looking here: a field
   with a line in it rather than a required box. */
.idle__note {
  margin-top: .75rem; padding-top: .75rem;
  border-top: 1px solid var(--neutral-150);
  font-size: .75rem; color: var(--neutral-500);
}
.idle__note b { display: block; margin-bottom: .25rem; font-weight: 700; color: var(--neutral-700); }
.idle__note-line { color: var(--neutral-600); }
.idle__note-line::after {
  content: ""; display: inline-block;
  width: 1px; height: .875rem; margin-left: 1px;
  background: var(--neutral-500); vertical-align: -2px;
}
@media (prefers-reduced-motion: no-preference) {
  .idle__note-line::after { animation: tt-caret 1.06s step-end infinite; }
}

/* Where it ends up. The last line of the card, because it is the answer to
   the question the whole page asks. */
.idle__outcome {
  margin: auto 0 0; padding-top: .75rem;
  display: flex; align-items: center; gap: .5rem;
  font-size: .75rem; color: var(--neutral-500);
}
.idle__outcome .icon { flex: none; color: var(--primary-600); }
.idle__outcome b { font-weight: 700; color: var(--neutral-900); font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ sizes */
@media (min-width: 860px) {
  /* The figure every other hero on the site carries. */
  .idle { height: 482px; }
}

@media (max-width: 859px) {
  /* The card goes under the day. Beside it at this width the band is 400px
     and the stretch being decided about is forty of them. */
  .idle { padding: 1.125rem 1.25rem; }
  .idle__split { grid-template-columns: minmax(0, 1fr); gap: 1.125rem; }
  .idle__band { height: 3.75rem; }
  .idle__sum b { font-size: 1.125rem; }
  .idle__outcome { margin-top: .75rem; }
}

@media (max-width: 599px) {
  .idle { padding: 1rem; }
  /* Two figures, not three: the day's total and the idle in it. How many
     decisions there were is the one a phone can do without. */
  .idle__sums { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .idle__sum:nth-child(3) { display: none; }
  .idle__seg b { display: none; }
}

/* --------------------------------------------------------------------------
   Folded in, and marked out
   --------------------------------------------------------------------------
   Section 04's figure: the same eight hours twice. Once with forty-five
   minutes of idle silently inside the total, and once with it marked and
   the total honest.

   Both rows are 480 minutes of elapsed time. The difference is one number
   at the end of them, and that number is the page's whole argument.
   -------------------------------------------------------------------------- */
.folded {
  margin-top: 2.5rem; padding: 1.5rem;
  border: 1px solid var(--neutral-200); border-radius: var(--r-lg);
  background: #fff;
}

.folded__row {
  display: grid; grid-template-columns: 12rem minmax(0, 1fr) 7rem;
  align-items: center; gap: .75rem;
  padding: 1.125rem 0;
}
.folded__row + .folded__row { border-top: 1px solid var(--neutral-150); }
.folded__name { margin: 0; font-size: .875rem; font-weight: 700; color: var(--neutral-900); }
.folded__sub { display: block; font-size: .75rem; font-weight: 400; color: var(--neutral-500); }

.folded__band {
  display: flex; gap: 3px;
  height: 2.75rem;
  border-radius: var(--r-sm);
  background: var(--neutral-50);
  box-shadow: inset 0 0 0 1px var(--neutral-150);
  padding: 3px;
  overflow: hidden;
}
.folded__seg {
  flex: 0 0 var(--w); min-width: 2px;
  border-radius: 2px;
  background: var(--primary-500);
  display: flex; align-items: center;
}
.folded__seg b {
  padding: 0 .5rem;
  font-size: .6875rem; font-weight: 700; color: #fff; white-space: nowrap;
}
.folded__seg--idle {
  background: repeating-linear-gradient(135deg,
    var(--neutral-200) 0 5px, var(--neutral-100) 5px 10px);
  box-shadow: inset 0 0 0 1px var(--neutral-200);
}
.folded__seg--idle b { color: var(--neutral-600); }

.folded__out {
  text-align: right;
  font-size: .9375rem; font-weight: 800; color: var(--neutral-900);
  font-variant-numeric: tabular-nums;
}
.folded__out span { display: block; font-size: .75rem; font-weight: 400; color: var(--neutral-500); }

@media (max-width: 859px) {
  .folded { padding: 1.25rem; }
  .folded__row { grid-template-columns: minmax(0, 1fr) 6rem; row-gap: .5rem; }
  .folded__band { grid-column: 1 / -1; }
  .folded__seg b { display: none; }
}
