/* Jet Lag Sleep Shift Planner — content styles.
   Prefix: --jl-  /  .jl-

   Reference point: a day-by-day bedtime schedule table is the result —
   not a single figure, since the whole point is watching the bedtime
   move a little each day. A 3-metric row above it gives the headline
   numbers (pre-flight shift achieved, remaining, full-adjustment
   estimate) before the day-by-day detail.

   THIS FILE STYLES THE CONTENT AREA ONLY. Chrome is owned by chrome.css. */

:root {
  --jl-surface: #ffffff;
  --jl-panel:   #f5f6f7;
  --jl-line:    #dde1e4;
  --jl-text:    #14181c;
  --jl-muted:   #626a72;
  --jl-bad:     #b3261e;
  --jl-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

.jl-wrap {
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Input panel ─────────────────────────────────────────────────────────── */

.jl-panel {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--jl-line);
  border-radius: 2px;
  background: var(--jl-surface);
}

.jl-field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 26rem) {
  .jl-field-grid { grid-template-columns: 1fr; }
}

.jl-field {
  display: grid;
  gap: 0.375rem;
}

.jl-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--jl-muted);
}

.jl-field input,
.jl-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font-family: var(--jl-mono);
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  color: var(--jl-text);
  background: var(--jl-surface);
  border: 1px solid var(--jl-line);
  border-radius: 2px;
}

.jl-field input:focus-visible,
.jl-field select:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: -1px;
}

.jl-error {
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--jl-bad);
  background: rgba(179, 38, 30, 0.06);
  border: 1px solid var(--jl-bad);
  border-radius: 2px;
}

/* ── Primary action button ──────────────────────────────────────────────── */

.jl-btn {
  display: block;
  width: 100%;
  padding: 0.75rem 1.5rem;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--tf-accent-ink);
  background: var(--tf-accent);
  border: 1px solid var(--tf-accent);
  border-radius: 2px;
  cursor: pointer;
  margin-bottom: 1.5rem;
}

.jl-btn:hover  { background: var(--tf-accent-hover);  border-color: var(--tf-accent-hover); }
.jl-btn:active { background: var(--tf-accent-active); border-color: var(--tf-accent-active); }

.jl-btn:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* ── Metrics + schedule table ────────────────────────────────────────────── */

.jl-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 30rem) {
  .jl-grid { grid-template-columns: 1fr; }
}

.jl-metric {
  padding: 1rem 0.75rem;
  border: 1px solid var(--jl-line);
  border-radius: 2px;
  background: var(--jl-panel);
  text-align: center;
}

.jl-metric-label {
  margin: 0 0 0.375rem;
  font-size: 0.75rem;
  color: var(--jl-muted);
}

.jl-metric-value {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--jl-text);
}

.jl-table {
  display: grid;
  border: 1px solid var(--jl-line);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.jl-row {
  display: grid;
  grid-template-columns: 1.3fr 0.8fr 1fr;
  gap: 0.5rem;
  padding: 0.5625rem 1rem;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  border-bottom: 1px solid var(--jl-line);
  background: var(--jl-surface);
}

.jl-row:last-child { border-bottom: none; }

.jl-row-head {
  background: var(--jl-panel);
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--jl-muted);
}

.jl-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--jl-muted);
}

/* ── Ad slots ───────────────────────────────────────────────────────────── */

.jl-ad {
  min-height: 280px;
  margin: 2rem auto 0;
  max-width: 34rem;
  padding-inline: 1.5rem;
}

@media (max-width: 26rem) {
  .jl-wrap,
  .jl-ad { padding-inline: 1rem; }
  .jl-panel { padding: 1.25rem; }
  .jl-row { grid-template-columns: 1.1fr 0.7fr 0.9fr; font-size: 0.8125rem; }
}

/* tf:dark-palette — generated by migrate_chrome.py */
/* Neutrals inherit the shared chrome tokens so all tools share one
   ground; brand hues are kept and lightened, never inverted. */
[data-theme="dark"] {
  --jl-surface: var(--tf-surface);
  --jl-panel: var(--tf-surface);
  --jl-line: var(--tf-surface);
  --jl-text: var(--tf-ink);
  --jl-muted: var(--tf-ink-soft);
  --jl-bad: #da8581;
}
