/* Amazon FBA vs FBM Calculator — content styles.
   Prefix: --fm-  /  .fm-

   Reference point: a side-by-side two-column comparison is the whole
   point of this tool — unlike a single-method fee calculator, the
   output has to show two full results at once so a seller can compare
   them directly, not toggle between them. First tool this loop shaped
   around a genuine two-option comparison rather than one calculated
   result, closest structurally to the input side of
   `wire-transfer-fx-fee-calculator` (grouped fieldsets for two
   comparable scenarios) but with the comparison carried through to
   the output side as well.

   THIS FILE STYLES THE CONTENT AREA ONLY. Chrome is owned by chrome.css. */

:root {
  --fm-surface: #ffffff;
  --fm-panel:   #f5f5f4;
  --fm-line:    #e2e0da;
  --fm-text:    #18170f;
  --fm-muted:   #66625a;
  --fm-win:     #1c7a4c;
  --fm-mono: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, Consolas, monospace;
}

.fm-wrap {
  width: 100%;
  max-width: 38rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

/* ── Input panel ─────────────────────────────────────────────────────────── */

.fm-panel {
  padding: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--fm-line);
  border-radius: 2px;
  background: var(--fm-surface);
}

.fm-field {
  margin-bottom: 1rem;
}

.fm-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.fm-row .fm-field {
  margin-bottom: 0;
}

.fm-panel > .fm-row {
  margin-bottom: 1rem;
}

.fm-field label {
  display: block;
  margin-bottom: 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fm-muted);
}

.fm-field input {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font-family: var(--fm-mono);
  font-size: 1rem;
  color: var(--fm-text);
  background: var(--fm-panel);
  border: 1px solid var(--fm-line);
  border-radius: 2px;
}

.fm-field input:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: -1px;
}

.fm-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 26rem) {
  .fm-cols { grid-template-columns: 1fr; }
  .fm-row { grid-template-columns: 1fr; gap: 0.75rem; }
  .fm-panel > .fm-row { margin-bottom: 0.75rem; }
}

.fm-col {
  padding: 1rem;
  border: 1px solid var(--fm-line);
  border-radius: 2px;
  background: var(--fm-panel);
}

.fm-col legend {
  padding: 0 0.375rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--fm-muted);
}

.fm-col .fm-field:last-child {
  margin-bottom: 0;
}

.fm-col .fm-field input {
  background: var(--fm-surface);
}

/* ── Primary action button ──────────────────────────────────────────────── */

.fm-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;
}

.fm-btn:hover  { background: var(--tf-accent-hover);  border-color: var(--tf-accent-hover); }
.fm-btn:active { background: var(--tf-accent-active); border-color: var(--tf-accent-active); }

.fm-btn:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* ── Comparison output ───────────────────────────────────────────────────── */

.fm-verdict {
  padding: 0.875rem 1rem;
  margin-bottom: 1rem;
  text-align: center;
  font-size: 0.9375rem;
  font-weight: 700;
  color: var(--fm-text);
  background: var(--fm-panel);
  border: 1px solid var(--fm-line);
  border-radius: 2px;
}

.fm-compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

@media (max-width: 26rem) {
  .fm-compare { grid-template-columns: 1fr; }
}

.fm-side {
  padding: 1.25rem 1rem;
  text-align: center;
  border: 1px solid var(--fm-line);
  border-radius: 2px;
  background: var(--fm-surface);
}

.fm-side--winner {
  border-color: color-mix(in srgb, var(--fm-win) 40%, var(--fm-line));
  background: color-mix(in srgb, var(--fm-win) 8%, var(--fm-surface));
}

.fm-side-label {
  margin: 0 0 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--fm-muted);
}

.fm-side-profit {
  margin: 0;
  font-family: var(--fm-mono);
  font-size: 1.5rem;
  font-weight: 800;
  color: var(--fm-text);
}

.fm-side--winner .fm-side-profit {
  color: var(--fm-win);
}

.fm-side-margin {
  margin: 0.375rem 0 0;
  font-size: 0.8125rem;
  font-variant-numeric: tabular-nums;
  color: var(--fm-muted);
}

.fm-shared {
  margin: 0 0 1rem;
  font-size: 0.8125rem;
  text-align: center;
  color: var(--fm-muted);
}

.fm-note {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--fm-muted);
}

/* ── Ad slots ───────────────────────────────────────────────────────────── */

.fm-ad {
  min-height: 280px;
  margin: 2rem auto 0;
  max-width: 38rem;
  padding-inline: 1.5rem;
  overflow: hidden;
}

@media (max-width: 26rem) {
  .fm-wrap,
  .fm-ad { padding-inline: 1rem; }
  .fm-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"] {
  --fm-surface: var(--tf-surface);
  --fm-panel: var(--tf-surface);
  --fm-line: var(--tf-rule);
  --fm-text: var(--tf-ink);
  --fm-muted: var(--tf-ink-soft);
  --fm-win: #5fd099;
}
