/* Milestone & Event Countdown Timer — content styles.
   Prefix: --ct-  /  .ct-

   Reference point: a 4-unit live-ticking digit row (days/hours/minutes/
   seconds) is the entire result — no metric row, no table, since the
   whole product is watching four numbers count down in real time.

   THIS FILE STYLES THE CONTENT AREA ONLY. Chrome is owned by chrome.css. */

:root {
  --ct-surface: #ffffff;
  --ct-panel:   #f5f6f7;
  --ct-line:    #dde1e4;
  --ct-text:    #14181c;
  --ct-muted:   #626a72;
  --ct-bad:     #b3261e;
  --ct-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

.ct-wrap {
  width: 100%;
  max-width: 34rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Input panel ─────────────────────────────────────────────────────────── */

.ct-panel {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--ct-line);
  border-radius: 2px;
  background: var(--ct-surface);
}

.ct-field {
  display: grid;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.ct-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ct-muted);
}

.ct-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font-family: var(--ct-mono);
  font-size: 0.9375rem;
  color: var(--ct-text);
  background: var(--ct-surface);
  border: 1px solid var(--ct-line);
  border-radius: 2px;
}

.ct-field input:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: -1px;
}

.ct-presets {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--ct-line);
  padding-top: 0.875rem;
}

.ct-preset-lbl {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ct-muted);
}

.ct-chip {
  padding: 0.3125rem 0.75rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ct-text);
  background: var(--ct-panel);
  border: 1px solid var(--ct-line);
  border-radius: 2px;
  cursor: pointer;
}

.ct-chip:hover {
  border-color: var(--tf-accent);
  color: var(--tf-accent);
}

.ct-error {
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ct-bad);
  background: rgba(179, 38, 30, 0.06);
  border: 1px solid var(--ct-bad);
  border-radius: 2px;
}

/* ── Primary action button ──────────────────────────────────────────────── */

.ct-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;
}

.ct-btn:hover  { background: var(--tf-accent-hover);  border-color: var(--tf-accent-hover); }
.ct-btn:active { background: var(--tf-accent-active); border-color: var(--tf-accent-active); }

.ct-btn:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* ── Countdown display ───────────────────────────────────────────────────── */

.ct-milestone-name {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--ct-text);
}

.ct-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 26rem) {
  .ct-grid { grid-template-columns: repeat(2, 1fr); gap: 0.625rem; }
}

.ct-unit {
  padding: 1.25rem 0.5rem;
  border: 1px solid var(--ct-line);
  border-radius: 2px;
  background: var(--ct-surface);
  text-align: center;
}

.ct-unit-value {
  margin: 0 0 0.25rem;
  font-family: var(--ct-mono);
  font-size: 2rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--tf-accent);
}

.ct-unit-label {
  margin: 0;
  font-size: 0.6875rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ct-muted);
}

.ct-target-label {
  margin: 0 0 1rem;
  text-align: center;
  font-size: 0.875rem;
  color: var(--ct-muted);
}

.ct-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--ct-muted);
}

/* ── Ad slots ───────────────────────────────────────────────────────────── */

.ct-ad {
  min-height: 280px;
  margin: 2rem auto 0;
  max-width: 34rem;
  padding-inline: 1.5rem;
}

@media (max-width: 26rem) {
  .ct-wrap,
  .ct-ad { padding-inline: 1rem; }
  .ct-panel { padding: 1.25rem; }
}

/* 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"] {
  --ct-surface: var(--tf-surface);
  --ct-panel: var(--tf-surface);
  --ct-line: var(--tf-surface);
  --ct-text: var(--tf-ink);
  --ct-muted: var(--tf-ink-soft);
  --ct-bad: #da8581;
}
