/* wholesale-shipto.css — «Ships to <ZIP>» (SEO/GEO spec-5 §3, 2026-09-08).
 *
 * Loaded by modules/shop/views/market/_ship_to.php ONLY while
 * wholesale_ship_to_chip_enabled is on, so a dark flag costs no request.
 *
 * Two elements, both additive: the toolbar chip, and the one-line delivery
 * window under a card's meta row. Nothing here restyles an existing selector —
 * turning the flag off must leave the catalogue exactly as it is today, and it
 * cannot do that if this sheet has opinions about .wm-card or .wm-toolbar.
 */

.wm-shipto {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-left: 12px;
  font-size: 12.5px;
  color: #556070;
  white-space: nowrap;
}

.wm-shipto-label { color: #1A202C; font-weight: 600; }

.wm-shipto-change {
  appearance: none;
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: #556070;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}
.wm-shipto-change:hover { color: #1A202C; }

.wm-shipto-form { display: flex; align-items: center; gap: 6px; }
/* `hidden` beats the author display above — a shell no script ever unhid, or a
   form the buyer did not open, must not render raw (seen on /wholesale/lots 2026-09-13). */
.wm-shipto[hidden], .wm-shipto-form[hidden] { display: none; }

.wm-shipto-form input {
  width: 74px;
  padding: 4px 7px;
  font: inherit;
  color: #1A202C;
  background: #FFF;
  border: 1px solid #D8DCE3;
  border-radius: 6px;
}
.wm-shipto-form input:focus-visible { outline: 2px solid #1A202C; outline-offset: 1px; }
.wm-shipto-form input[aria-invalid="true"] { border-color: #B42318; }

.wm-shipto-form button {
  padding: 4px 10px;
  font: inherit;
  font-weight: 600;
  color: #FFF;
  background: #1A202C;
  border: 0;
  border-radius: 6px;
  cursor: pointer;
}

/* Screen-reader-only: the input's label and the purpose note. The chip has
 * room for neither, and an <input> with a placeholder and no label is a field
 * that only a sighted mouse user can identify. */
.wm-shipto-hidden-label {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* The per-card window. Quieter than the meta line above it: it is an estimate,
 * and it should not read with the authority of the unit count. */
.wm-card-eta {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.4;
  color: #6B7683;
}

/* a3.1 (2026-09-23): the delivery PRICE to the visitor's ZIP — the same quiet register as the
 * window, the number in the card's mono so it reads as a figure, not a claim. */
.wm-card-price-est {
  display: block;
  margin-top: 2px;
  font-size: 11.5px;
  line-height: 1.4;
  color: #4B5563;
  font-variant-numeric: tabular-nums;
}
.wm-card-price-est[hidden] { display: none; }

/* a3 (2026-09-22; quieted 2026-09-23, Ivan: the pill took too much attention — Faire benchmark):
 * «Near you» is META TEXT, not a badge — the same grey register as the delivery line it follows
 * («Parcel to 46236 · est. $8.56 · Near you»), no fill, no colour, no weight. Location on a Faire
 * tile is a quiet grey line («Based in Portland, OR»), never a chip. */
.wm-card-near {
  display: block;
  margin: 2px 0 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  font-size: 11.5px;
  font-weight: 400;
  line-height: 1.4;
  color: #4B5563;
}
.wm-card-near[hidden] { display: none; }

@media (max-width: 700px) {
  .wm-shipto { margin-left: 0; width: 100%; }
}

/* phone: the chip takes its own line under the sort row instead of pushing the
   toolbar past the viewport (393px overflowed by 47px on 2026-09-08). */
@media (max-width: 640px) {
  .wm-shipto { flex-basis: 100%; margin-left: 0; margin-top: 6px; white-space: normal; }
  .wm-shipto-form { flex-wrap: wrap; }
}
