/* Exact Age Calculator (Days, Hours & Minutes) — content styles.
   Prefix: --ea-  /  .ea-

   Reference point: a single hero "years, months, days" figure is the
   headline, with a 4-metric total row (days/weeks/hours/minutes) below
   it as supporting context, plus a small standalone "next birthday"
   strip — three tiers of information, most-human-readable first.

   THIS FILE STYLES THE CONTENT AREA ONLY. Chrome is owned by chrome.css. */

:root {
  --ea-surface: #ffffff;
  --ea-panel:   #f5f6f7;
  --ea-line:    #dde1e4;
  --ea-text:    #14181c;
  --ea-muted:   #626a72;
  --ea-bad:     #b3261e;
  --ea-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

.ea-wrap {
  width: 100%;
  max-width: 36rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Input panel ─────────────────────────────────────────────────────────── */

.ea-panel {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--ea-line);
  border-radius: 2px;
  background: var(--ea-surface);
}

.ea-field {
  display: grid;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.ea-field:last-of-type { margin-bottom: 0; }

.ea-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--ea-muted);
}

.ea-field input[type="datetime-local"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font-family: var(--ea-mono);
  font-size: 0.9375rem;
  color: var(--ea-text);
  background: var(--ea-surface);
  border: 1px solid var(--ea-line);
  border-radius: 2px;
}

.ea-field input:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: -1px;
}

.ea-asof-row {
  display: flex;
  gap: 0.5rem;
}

.ea-asof-row input { flex: 1; min-width: 0; }

@media (max-width: 22rem) {
  .ea-asof-row { flex-direction: column; }
  .ea-now-btn { width: 100%; padding: 0.5rem; }
}

.ea-now-btn {
  padding: 0 1rem;
  font-family: inherit;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--tf-accent);
  background: var(--ea-panel);
  border: 1px solid var(--ea-line);
  border-radius: 2px;
  cursor: pointer;
}

.ea-now-btn:hover { border-color: var(--tf-accent); }

.ea-error {
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--ea-bad);
  background: rgba(179, 38, 30, 0.06);
  border: 1px solid var(--ea-bad);
  border-radius: 2px;
}

/* ── Primary action button ──────────────────────────────────────────────── */

.ea-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;
}

.ea-btn:hover  { background: var(--tf-accent-hover);  border-color: var(--tf-accent-hover); }
.ea-btn:active { background: var(--tf-accent-active); border-color: var(--tf-accent-active); }

.ea-btn:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* ── Hero + metrics ──────────────────────────────────────────────────────── */

.ea-hero {
  padding: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
  border: 1px solid var(--ea-line);
  border-radius: 2px;
  background: var(--ea-surface);
}

.ea-hero-label {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ea-muted);
}

.ea-hero-value {
  margin: 0;
  font-size: 1.625rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--tf-accent);
}

.ea-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.625rem;
  margin-bottom: 1rem;
}

@media (max-width: 34rem) {
  .ea-grid { grid-template-columns: repeat(2, 1fr); }
}

.ea-metric {
  padding: 0.875rem 0.5rem;
  border: 1px solid var(--ea-line);
  border-radius: 2px;
  background: var(--ea-panel);
  text-align: center;
}

.ea-metric-label {
  margin: 0 0 0.375rem;
  font-size: 0.6875rem;
  color: var(--ea-muted);
}

.ea-metric-value {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--ea-text);
}

/* ── Next birthday strip ─────────────────────────────────────────────────── */

.ea-next {
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.875rem;
  border: 1px solid var(--ea-line);
  border-radius: 2px;
  background: var(--ea-surface);
}

.ea-next-label {
  font-size: 0.8125rem;
  color: var(--ea-muted);
}

.ea-next-value {
  font-size: 1rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--tf-accent);
}

/* ── Ad slots ───────────────────────────────────────────────────────────── */

.ea-ad {
  min-height: 280px;
  margin: 2rem auto 0;
  max-width: 36rem;
  padding-inline: 1.5rem;
}

@media (max-width: 26rem) {
  .ea-wrap,
  .ea-ad { padding-inline: 1rem; }
  .ea-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"] {
  --ea-surface: var(--tf-surface);
  --ea-panel: var(--tf-surface);
  --ea-line: var(--tf-surface);
  --ea-text: var(--tf-ink);
  --ea-muted: var(--tf-ink-soft);
  --ea-bad: #da8581;
}
