/* Converter widget styles — shared by the tool page and every landing page
   that embeds it. Class contract belongs to app.js: .summary, .warnings,
   .paywall, .quickfill, .grid, .btn/.btn-quiet, etc. Restyle only, never
   rename. Identity notes live in assets/base.css. */

/* the ATTACH FILE zone — crop marks in opposite corners, like a print proof */
.dropzone {
  position: relative;
  border: 1.5px dashed var(--rule-mid);
  border-radius: var(--radius);
  padding: 44px 20px;
  text-align: center;
  cursor: pointer;
  background: var(--surface);
  transition: border-color 0.12s ease, background-color 0.12s ease;
}
.dropzone::before, .dropzone::after {
  content: "";
  position: absolute;
  width: 14px; height: 14px;
  pointer-events: none;
}
.dropzone::before { top: 6px; left: 6px; border-top: 2px solid var(--ink); border-left: 2px solid var(--ink); }
.dropzone::after { bottom: 6px; right: 6px; border-bottom: 2px solid var(--ink); border-right: 2px solid var(--ink); }
.dropzone:hover { border-color: var(--blue); }
.dropzone.dragging { border-color: var(--blue); background: var(--blue-wash); }
.dropzone p { margin: 0.3rem 0; }
.dropzone .dz-icon { color: var(--blue); margin-bottom: 6px; }
.dropzone .hint { color: var(--muted); font: 0.78rem/1.6 var(--mono); }

.summary { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: baseline; margin: 16px 0 6px; }
.summary strong {
  font-family: var(--display);
  font-stretch: 87.5%;
  font-size: 1.25rem;
  letter-spacing: 0.01em;
}
.summary .muted { color: var(--muted); font-size: 0.92rem; }

/* warnings: correction ink in the margin */
.warnings {
  background: var(--red-wash);
  border: 1px solid #e3b3a8;
  border-left: 3px solid var(--red-ink);
  border-radius: var(--radius);
  padding: 10px 14px;
  margin: 10px 0;
  font-size: 0.92rem;
}
.warnings strong { color: var(--red-ink); }
.warnings ul { margin: 4px 0 0; padding-left: 1.1rem; }

/* paywall: the BALANCE DUE zone — a form section, not an alarm */
.paywall {
  border: 1px solid var(--rule-mid);
  border-top: 3px solid var(--ink);
  background: var(--blue-wash);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin: 12px 0;
}
.paywall p { margin: 0 0 10px; }
.paywall .fineprint { color: var(--muted); font-size: 0.85rem; margin: 10px 0 0; }

.quickfill {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  background: var(--blue-wash);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 10px 12px;
  margin: 14px 0 10px;
  font-size: 0.95rem;
}
.quickfill label {
  font: 700 0.7rem/1 var(--mono);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--blue-deep);
  margin-right: 4px;
}
.quickfill select, .quickfill input {
  /* 16px floor everywhere: iOS/iPadOS Safari auto-zooms any focused field
     under 16px, and that fires on iPads and landscape phones too — no
     width-gated version covers the whole device class */
  font: 1rem/1.5 var(--mono); padding: 6px 8px;
  border: 1px solid var(--rule-mid); border-radius: var(--radius); background: var(--surface);
  color: var(--ink);
  /* a select is as wide as its widest option (variant names can be long) —
     never let it push past the quickfill box on narrow screens */
  max-width: 100%;
}
.quickfill input[type="number"] { width: 90px; }
.qf-status { color: var(--blue-deep); font-weight: 600; margin-left: 4px; font-size: 0.88rem; }

.grid-scroll { overflow-x: auto; border: 1px solid var(--rule-mid); border-radius: var(--radius); background: var(--surface); }
table.grid { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.grid th, .grid td { padding: 7px 10px; border-bottom: 1px solid var(--rule); text-align: left; vertical-align: middle; }
.grid th {
  background: var(--paper);
  border-bottom: 2px solid var(--ink);
  font: 700 0.66rem/1.6 var(--mono);
  text-transform: uppercase; letter-spacing: 0.1em;
  color: var(--muted);
}
.grid td.listing-cell { font-weight: 600; max-width: 260px; }
.grid td.num { font-variant-numeric: tabular-nums; }
.grid input {
  /* 16px floor: same iOS auto-zoom rationale as the quickfill fields */
  font: 1rem/1.5 var(--mono); padding: 5px 7px; border: 1px solid var(--rule-mid);
  border-radius: var(--radius); background: var(--surface); color: var(--ink); width: 110px;
}
.grid input.sku { width: 140px; }
.grid input.qty { width: 70px; }
.variant-label { color: var(--muted); font: 0.82rem/1.6 var(--mono); }

.download-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin-top: 16px; }
.download-note { color: var(--muted); font-size: 0.9rem; }

/* steps: a true sequence — export, price, import. Deterministic column
   counts (not auto-fit) so end-of-list items can be told to fill the
   remaining tracks instead of leaving dead cells. */
.steps {
  display: grid; grid-template-columns: 1fr;
  gap: 16px 28px; padding: 0; margin: 14px 0; list-style: none; counter-reset: step;
}
@media (min-width: 660px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  /* odd counts: last step spans the row, no hole */
  .steps li:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (min-width: 980px) {
  .steps { grid-template-columns: repeat(3, 1fr); }
  /* remainder 2 (5, 8 steps): last one spans two tracks; remainder 1
     (4, 7 steps): last one spans the row; remainder 0 (3, 6): plain cell.
     The 3n rule must match the 660px odd-span rule's specificity (0,3,1) —
     a bare li:last-child reset loses that cascade fight and the odd-span
     leaks into the 3-column layout (critic round 2, 2026-07-11). */
  .steps li:last-child:nth-child(3n) { grid-column: auto; }
  .steps li:last-child:nth-child(3n+2) { grid-column: span 2; }
  .steps li:last-child:nth-child(3n+1) { grid-column: 1 / -1; }
}
.steps li {
  border-top: 1px solid var(--rule-mid);
  padding: 14px 2px 0;
  counter-increment: step;
}
.steps li::before {
  content: "STEP " counter(step, decimal-leading-zero);
  font: 700 0.68rem/1 var(--mono);
  letter-spacing: 0.14em;
  color: var(--blue-deep);
  display: block;
  margin-bottom: 8px;
}
.steps h3 { margin: 0 0 4px; }
.steps p { margin: 0; color: var(--muted); font-size: 0.93rem; }

/* stamp placement over the tool card's top border — the margin is the
   stamp's headroom; without it the stamp overlaps whatever sits above */
.tool-card { position: relative; margin-top: 34px; }
.tool-card .stamp { position: absolute; top: -16px; right: 18px; }
@media (max-width: 560px) {
  .tool-card .stamp { position: static; display: inline-block; margin-bottom: 12px; }
}
