/* Wallpaper Roll & Pattern Repeat Calculator — content styles.
   Prefix: --wp-  /  .wp-

   Reference point: a hero "rolls needed" whole number leads, since
   that's the number a visitor is actually going to buy against, backed
   by a 3-metric row showing the intermediate strip math so the pattern-
   repeat waste is visible rather than hidden inside a single figure.
   First home-diy-cluster tool built this loop.

   THIS FILE STYLES THE CONTENT AREA ONLY. Chrome is owned by chrome.css. */

:root {
  --wp-surface: #ffffff;
  --wp-panel:   #f5f6f4;
  --wp-line:    #dee2dc;
  --wp-text:    #14180f;
  --wp-muted:   #63695c;
  --wp-bad:     #b3261e;
  --wp-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

.wp-wrap {
  width: 100%;
  max-width: 36rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Input panel ─────────────────────────────────────────────────────────── */

.wp-panel {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--wp-line);
  border-radius: 2px;
  background: var(--wp-surface);
}

.wp-field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

@media (max-width: 28rem) {
  .wp-field-grid { grid-template-columns: 1fr; }
}

.wp-field {
  display: grid;
  gap: 0.375rem;
}

.wp-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--wp-muted);
}

.wp-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font-family: var(--wp-mono);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  color: var(--wp-text);
  background: var(--wp-surface);
  border: 1px solid var(--wp-line);
  border-radius: 2px;
}

.wp-field input:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: -1px;
}

.wp-error {
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--wp-bad);
  background: rgba(179, 38, 30, 0.06);
  border: 1px solid var(--wp-bad);
  border-radius: 2px;
}

.wp-hint {
  margin: 0.875rem 0 0;
  padding-top: 0.875rem;
  border-top: 1px solid var(--wp-line);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--wp-muted);
}

/* ── Primary action button ──────────────────────────────────────────────── */

.wp-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;
}

.wp-btn:hover  { background: var(--tf-accent-hover);  border-color: var(--tf-accent-hover); }
.wp-btn:active { background: var(--tf-accent-active); border-color: var(--tf-accent-active); }

.wp-btn:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* ── Hero + metrics ──────────────────────────────────────────────────────── */

.wp-hero {
  padding: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
  border: 1px solid var(--wp-line);
  border-radius: 2px;
  background: var(--wp-surface);
}

.wp-hero-label {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--wp-muted);
}

.wp-hero-value {
  margin: 0;
  font-size: 2.5rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--tf-accent);
}

.wp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 30rem) {
  .wp-grid { grid-template-columns: 1fr; }
}

.wp-metric {
  padding: 1rem 0.75rem;
  border: 1px solid var(--wp-line);
  border-radius: 2px;
  background: var(--wp-panel);
  text-align: center;
}

.wp-metric-label {
  margin: 0 0 0.375rem;
  font-size: 0.75rem;
  color: var(--wp-muted);
}

.wp-metric-value {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--wp-text);
}

.wp-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--wp-muted);
}

/* ── Ad slots ───────────────────────────────────────────────────────────── */

.wp-ad {
  min-height: 280px;
  margin: 2rem auto 0;
  max-width: 36rem;
  padding-inline: 1.5rem;
}

@media (max-width: 26rem) {
  .wp-wrap,
  .wp-ad { padding-inline: 1rem; }
  .wp-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"] {
  --wp-surface: var(--tf-surface);
  --wp-panel: var(--tf-surface);
  --wp-line: var(--tf-rule);
  --wp-text: var(--tf-ink);
  --wp-muted: var(--tf-ink-soft);
  --wp-bad: #da8581;
}
