/* Amazon FBA Fee & Profit Margin Calculator — content styles.
   Prefix: --fba-  /  .fba-

   Reference point: a seller's own spreadsheet fee-breakdown row, not a
   corporate dashboard. Dense, ledger-like, monospace figures (unlike
   saas-churn-and-ltv-calculator, the other single-column money tool, which
   deliberately avoids monospace — this one leans into it, since FBA sellers
   are used to reading exact per-unit fee lines).

   THIS FILE STYLES THE CONTENT AREA ONLY. Chrome is owned by chrome.css. */

:root {
  --fba-surface: #ffffff;
  --fba-panel:   #f7f7f5;
  --fba-line:    #e2e0da;
  --fba-text:    #14140f;
  --fba-muted:   #66645c;
  --fba-good:    #166534;
  --fba-warn:    #a16207;
  --fba-bad:     #b91c1c;
}

.fba-wrap {
  width: 100%;
  max-width: 46rem;
  margin-inline: auto;
  padding-inline: 1.5rem;
}

.fba-card {
  background: var(--fba-surface);
  border: 1px solid var(--fba-line);
  border-radius: 2px;
}

/* ── Input panel ────────────────────────────────────────────────────────── */

.fba-panel {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.fba-field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

@media (max-width: 34rem) {
  .fba-field-grid { grid-template-columns: 1fr; }
}

.fba-field {
  display: grid;
  gap: 0.375rem;
}

.fba-field label {
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fba-muted);
}

.fba-field input,
.fba-field select {
  width: 100%;
  box-sizing: border-box;
  padding: 0.625rem 0.75rem;
  font-size: 0.9375rem;
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-variant-numeric: tabular-nums;
  color: var(--fba-text);
  background: var(--fba-surface);
  border: 1px solid var(--fba-line);
  border-radius: 2px;
}

.fba-field select {
  font-family: inherit;
}

.fba-field input:focus-visible,
.fba-field select:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 1px;
  border-color: var(--tf-accent);
}

.fba-fee-hint {
  margin: 0 0 1.25rem;
  font-size: 0.75rem;
  line-height: 1.5;
  color: var(--fba-muted);
}

.fba-presets {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
  border-top: 1px solid var(--fba-line);
  padding-top: 1rem;
  margin-bottom: 1.25rem;
}

.fba-preset-lbl {
  font-size: 0.6875rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--fba-muted);
}

.fba-chip {
  padding: 0.3125rem 0.75rem;
  font-family: inherit;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--fba-text);
  background: var(--fba-surface);
  border: 1px solid var(--fba-line);
  border-radius: 2px;
  cursor: pointer;
}

.fba-chip:hover {
  border-color: var(--tf-accent);
  color: var(--tf-accent);
}

/* ── Primary action button ──────────────────────────────────────────────── */

.fba-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;
}

.fba-btn:hover  { background: var(--tf-accent-hover);  border-color: var(--tf-accent-hover); }
.fba-btn:active { background: var(--tf-accent-active); border-color: var(--tf-accent-active); }

.fba-btn:focus-visible {
  outline: 2px solid var(--tf-accent);
  outline-offset: 2px;
}

/* ── Verdict banner ─────────────────────────────────────────────────────── */

.fba-verdict-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.375rem;
  text-align: center;
  padding: 1.75rem 1.5rem;
  margin-bottom: 1.5rem;
  background: var(--fba-panel);
  border: 1px solid var(--fba-line);
  border-left: 3px solid var(--tf-accent);
  border-radius: 2px;
}

.fba-verdict-lbl {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--fba-muted);
}

.fba-verdict-value {
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: clamp(2rem, 7vw, 3rem);
  font-weight: 800;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
  color: var(--tf-accent);
}

.fba-verdict-tag {
  font-size: 0.9375rem;
  font-weight: 700;
}

.fba-verdict-tag.good { color: var(--fba-good); }
.fba-verdict-tag.warn { color: var(--fba-warn); }
.fba-verdict-tag.bad  { color: var(--fba-bad); }

.fba-verdict-card.good { border-left-color: var(--fba-good); }
.fba-verdict-card.warn { border-left-color: var(--fba-warn); }
.fba-verdict-card.bad  { border-left-color: var(--fba-bad); }

/* ── Metrics grid ───────────────────────────────────────────────────────── */

.fba-metrics-card {
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.fba-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin-bottom: 1.25rem;
}

@media (max-width: 34rem) {
  .fba-metrics-grid { grid-template-columns: repeat(2, 1fr); }
}

.fba-metric {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.fba-m-lbl {
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--fba-muted);
  line-height: 1.35;
}

.fba-m-val {
  font-family: ui-monospace, "SFMono-Regular", monospace;
  font-size: 1.125rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--fba-text);
}

.fba-m-val.fba-highlight {
  color: var(--tf-accent);
}

.fba-note {
  margin: 0;
  padding-top: 1.25rem;
  border-top: 1px solid var(--fba-line);
  font-size: 0.8125rem;
  line-height: 1.55;
  color: var(--fba-muted);
}

/* ── Ad slots ───────────────────────────────────────────────────────────── */

.fba-ad {
  min-height: 280px;
  margin: 2rem auto 0;
  max-width: 46rem;
  padding-inline: 1.5rem;
}

@media (max-width: 34rem) {
  .fba-wrap,
  .fba-ad { padding-inline: 1rem; }
  .fba-panel,
  .fba-metrics-card { 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"] {
  --fba-surface: var(--tf-surface);
  --fba-panel: var(--tf-surface);
  --fba-line: var(--tf-rule);
  --fba-text: var(--tf-ink);
  --fba-muted: var(--tf-ink-soft);
  --fba-good: #59cf86;
  --fba-warn: #d4aa6d;
  --fba-bad: #da8181;
}
