/* Strike — the check-days screen.
 *
 * Every colour is a token from tokens.css (05_CONVENTIONS.md guardrail 10);
 * scripts/check.js fails the build on a raw hex anywhere under src/public.
 *
 * The territory colour is used two ways and they need different values: as a
 * fill behind white (`--t-strike`, with `--t-strike-fg` on it) and as text on
 * its own tint (`--t-strike-deep`). The design file uses the primary in both
 * positions, which measures 3.65:1 on the tint — below AA, and worst in the
 * blinding sun this app exists for. See 04_DESIGN_HANDOFF.md § Contrast.
 */

.strike-back {
  display: inline-flex;
  align-items: center;
  min-height: var(--tap-min);
  padding: 0 var(--space-2) var(--space-3) 0;
  border: 0;
  background: none;
  color: var(--soft);
  font: inherit;
  font-size: var(--size-small);
  cursor: pointer;
}

/* --- the territory header ------------------------------------------------- */

.strike-hero {
  border-radius: var(--radius-card);
  padding: var(--space-4) var(--space-5);
  background: var(--t-strike-t);
  margin-bottom: var(--space-5);
}

.strike-hero-head { display: flex; align-items: center; gap: var(--space-3); }

.strike-hero-emoji { font-size: 23px; line-height: 1; }

.strike-hero-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(21px, 2.5vw, 29px);
  font-weight: var(--weight-normal);
  line-height: 1.15;
  color: var(--t-strike-deep);
}

.strike-hero-blurb {
  margin: var(--space-2) 0 0;
  max-width: 46em;
  font-size: 15px;
  color: var(--soft);
}

.strike-hero-times {
  margin: var(--space-2) 0 0;
  font-size: var(--size-micro);
  color: var(--soft);
}

.strike-lede { margin: 0 0 var(--space-3); font-size: 15px; }

/* --- the four days -------------------------------------------------------- */

.strike-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-5);
}

.strike-day {
  display: flex;
  gap: var(--space-3);
  align-items: flex-start;
  min-height: 56px;
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--line);
  border-radius: var(--radius-control);
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}

.strike-day.is-on { background: var(--t-strike-t); border-color: var(--t-strike); }

.strike-day:focus-within { outline: 2px solid var(--ink); outline-offset: 2px; }

/* The checkbox is the box: styling the real control keeps the keyboard, the
 * screen reader and the label click working without re-implementing any of it. */
.strike-box {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 24px;
  height: 24px;
  margin: 2px 0 0;
  display: grid;
  place-items: center;
  border: 2px solid var(--line);
  border-radius: 5px;
  background: transparent;
  cursor: pointer;
}

.strike-box:checked { border-color: var(--t-strike); background: var(--t-strike); }

.strike-box:checked::after {
  content: '✓';
  color: var(--t-strike-fg);
  font-size: var(--size-small);
  font-weight: var(--weight-bold);
  line-height: 1;
}

.strike-day-body { flex: 1; min-width: 0; }

.strike-day-title {
  display: block;
  font-size: var(--size-body);
  font-weight: var(--weight-semibold);
}

.strike-day-meta {
  display: block;
  font-size: var(--size-small);
  color: var(--soft);
  font-variant-numeric: tabular-nums;
}

.strike-day-tasks {
  display: block;
  margin-top: var(--space-1);
  font-size: var(--size-small);
  color: var(--soft);
  line-height: 1.45;
}

/* --- refund indicator (Rule 4) -------------------------------------------- */

.strike-refund {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
  justify-content: space-between;
  border-radius: var(--radius-card);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
  background: var(--card);
}

.strike-refund-label { font-size: var(--size-small); color: var(--soft); }

.strike-refund-value {
  font-size: var(--size-body);
  font-weight: var(--weight-semibold);
  color: var(--soft);
  font-variant-numeric: tabular-nums;
}

.strike-refund.is-earned { background: var(--live-bg); }
.strike-refund.is-earned .strike-refund-value { color: var(--live); }

/* --- note, identity, save ------------------------------------------------- */

.strike-note {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  max-width: 420px;
  margin-bottom: var(--space-4);
}

/* A fill and a radius, the way the design's identity and password blocks are
 * drawn (`background: var(--card); border-radius: 8px`) — not a bordered card.
 * A form on this page is part of the page, not a second document on it. */
.strike-identity {
  border-radius: var(--radius-control);
  background: var(--card);
  padding: 13px 14px;
  margin-bottom: var(--space-4);
}

/* A kicker, not a second page title. The design labels a block like this at
 * 11px/700/0.16em uppercase in --soft; a 21px serif heading in the middle of a
 * form competes with the territory's own name at the top of the screen. */
.strike-identity-title {
  margin: 0 0 var(--space-3);
  font-family: var(--font-ui);
  font-size: var(--size-kicker);
  font-weight: var(--weight-bold);
  letter-spacing: var(--track-kicker);
  text-transform: uppercase;
  color: var(--soft);
}

.strike-identity-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-3);
}

/* Bottom-aligned so the inputs form one line across the row even when a hint
 * wraps to two lines in a narrow column. */
.strike-field {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-1);
}

.strike-identity-note {
  margin: var(--space-3) 0 0;
  font-size: var(--size-micro);
  color: var(--soft);
}

.strike-error {
  margin: 0 0 var(--space-3);
  font-size: var(--size-small);
  color: var(--gap);
}

.strike-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-3);
  align-items: center;
}

.strike-save {
  border-color: var(--t-strike);
  background: var(--t-strike);
  color: var(--t-strike-fg);
  font-size: 15px;
  padding: var(--space-3) var(--space-5);
}

.strike-session { font-size: var(--size-small); color: var(--soft); }

@media (max-width: 767px) {
  .strike-days { grid-template-columns: 1fr; }
  .strike-save { flex: 1 1 auto; }
}
