/* International Wire Transfer & FX Fee Calculator — content styles.
   Prefix: --fx-  /  .fx-

   Reference point: a hero "total true cost" figure leads, since that's
   the number a bank's own quote never shows directly — backed by a
   3-metric row splitting the cost into its two real components (rate
   markup vs. flat fees) and a simple two-line before/after comparison.

   THIS FILE STYLES THE CONTENT AREA ONLY. Chrome is owned by chrome.css. */

:root {
  --fx-surface: #ffffff;
  --fx-panel:   #f6f5f3;
  --fx-line:    #e0dcd4;
  --fx-text:    #191510;
  --fx-muted:   #6b6459;
  --fx-bad:     #b3261e;
  --fx-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

.fx-wrap {
  width: 100%;
  max-width: 38rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Input panel ─────────────────────────────────────────────────────────── */

.fx-panel {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--fx-line);
  border-radius: 2px;
  background: var(--fx-surface);
}

.fx-field {
  display: grid;
  gap: 0.375rem;
  margin-bottom: 1rem;
}

.fx-field:last-child { margin-bottom: 0; }

.fx-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fx-muted);
}

.fx-field input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font-family: var(--fx-mono);
  font-size: 0.9375rem;
  font-variant-numeric: tabular-nums;
  color: var(--fx-text);
  background: var(--fx-surface);
  border: 1px solid var(--fx-line);
  border-radius: 2px;
}

.fx-field input:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: -1px;
}

.fx-field-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (max-width: 28rem) {
  .fx-field-grid { grid-template-columns: 1fr; }
}

.fx-error {
  margin: 0 0 0.875rem;
  padding: 0.75rem 1rem;
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--fx-bad);
  background: rgba(179, 38, 30, 0.06);
  border: 1px solid var(--fx-bad);
  border-radius: 2px;
}

.fx-hint {
  margin: 0;
  padding-top: 0.875rem;
  border-top: 1px solid var(--fx-line);
  font-size: 0.8125rem;
  line-height: 1.5;
  color: var(--fx-muted);
}

/* ── Primary action button ──────────────────────────────────────────────── */

.fx-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;
}

.fx-btn:hover  { background: var(--tf-accent-hover);  border-color: var(--tf-accent-hover); }
.fx-btn:active { background: var(--tf-accent-active); border-color: var(--tf-accent-active); }

.fx-btn:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* ── Hero + metrics ──────────────────────────────────────────────────────── */

.fx-hero {
  padding: 1.5rem;
  margin-bottom: 1rem;
  text-align: center;
  border: 1px solid var(--fx-line);
  border-radius: 2px;
  background: var(--fx-surface);
}

.fx-hero-label {
  margin: 0 0 0.5rem;
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fx-muted);
}

.fx-hero-value {
  margin: 0;
  font-size: 2.25rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  color: var(--tf-accent);
}

.fx-hero-sub {
  margin: 0.375rem 0 0;
  font-size: 0.875rem;
  color: var(--fx-muted);
}

.fx-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 30rem) {
  .fx-grid { grid-template-columns: 1fr; }
}

.fx-metric {
  padding: 1rem 0.75rem;
  border: 1px solid var(--fx-line);
  border-radius: 2px;
  background: var(--fx-panel);
  text-align: center;
}

.fx-metric-label {
  margin: 0 0 0.375rem;
  font-size: 0.75rem;
  color: var(--fx-muted);
}

.fx-metric-value {
  margin: 0;
  font-size: 1.1875rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--fx-text);
}

.fx-metric-sub {
  margin: 0.25rem 0 0;
  font-size: 0.75rem;
  color: var(--fx-muted);
}

/* ── Before/after comparison ─────────────────────────────────────────────── */

.fx-compare {
  border: 1px solid var(--fx-line);
  border-radius: 2px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.fx-compare-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.625rem 1rem;
  font-size: 0.875rem;
  font-variant-numeric: tabular-nums;
  background: var(--fx-surface);
  border-bottom: 1px solid var(--fx-line);
}

.fx-compare-row:last-child { border-bottom: none; font-weight: 700; }

.fx-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--fx-muted);
}

/* ── Ad slots ───────────────────────────────────────────────────────────── */

.fx-ad {
  min-height: 280px;
  margin: 2rem auto 0;
  max-width: 38rem;
  padding-inline: 1.5rem;
}

@media (max-width: 26rem) {
  .fx-wrap,
  .fx-ad { padding-inline: 1rem; }
  .fx-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"] {
  --fx-surface: var(--tf-surface);
  --fx-panel: var(--tf-surface);
  --fx-line: var(--tf-rule);
  --fx-text: var(--tf-ink);
  --fx-muted: var(--tf-ink-soft);
  --fx-bad: #da8581;
}
