/* Ovasta Seeds cart ONLY — Weighbridge Gate
 * Isolation: EVERY rule scoped to body.page-a99-weighbridge
 * Loads solely from includes/a99-wheel-head.php
 * Never pair with a36-cart / a98 / a97 / a96 cart CSS / shared .page-cart /
 * tote / gumball / brickbond / platebelt / wheelbarrow dual-ghost foot recipes.
 */

body.page-a99-weighbridge {
  --wg-ease: cubic-bezier(0.22, 1, 0.36, 1);
  background:
    linear-gradient(90deg, #cfd6dc 0 72px, transparent 72px),
    linear-gradient(180deg, #d5dde4 0%, var(--cf-field) 40%, #e2e8ee 100%);
  min-height: 100vh;
}

body.page-a99-weighbridge .wg-mast {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  width: min(100% - 32px, var(--cf-max));
  margin: 0 auto;
  padding: clamp(28px, 5vw, 48px) 0 18px;
}
body.page-a99-weighbridge .wg-kicker {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cf-text-cone);
}
body.page-a99-weighbridge .wg-mast h1 {
  margin: 0 0 8px;
  font-family: var(--cf-font-display);
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 400;
  line-height: 1.05;
  color: var(--cf-ink);
}
body.page-a99-weighbridge .wg-mast-copy p:last-child {
  margin: 0;
  max-width: 44ch;
  color: var(--cf-mute);
  font-weight: 500;
}
body.page-a99-weighbridge .wg-notice {
  margin: 0 0 12px;
  padding: 10px 12px;
  max-width: 44ch;
  background: var(--cf-signal);
  color: var(--cf-signal-ink);
  border: 2px solid #000;
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.35;
}

/* Mile-marker count (not square badge) */
body.page-a99-weighbridge .wg-mile {
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-rows: auto auto;
  column-gap: 10px;
  align-items: center;
  min-width: 110px;
  padding: 10px 14px 12px;
  background: var(--cf-asphalt);
  color: var(--cf-signal);
  border: 3px solid #000;
  clip-path: polygon(0 0, 100% 0, 100% 78%, 86% 100%, 0 100%);
  box-shadow: 4px 4px 0 var(--cf-cone);
}
body.page-a99-weighbridge .wg-mile-tag {
  grid-row: 1 / 3;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  color: var(--cf-tape);
}
body.page-a99-weighbridge .wg-mile strong {
  font-family: var(--cf-font-display);
  font-size: 1.9rem;
  line-height: 1;
  color: #fff;
}
body.page-a99-weighbridge .wg-mile span:last-child {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--cf-soft-on-dark);
}

/* Yard: left action rail + main */
body.page-a99-weighbridge .wg-yard {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 20px;
  width: min(100% - 32px, var(--cf-max));
  margin: 0 auto;
  padding: 0 0 clamp(48px, 8vw, 80px);
  align-items: start;
}
body.page-a99-weighbridge.is-empty .wg-yard {
  grid-template-columns: 1fr;
}

/* LEFT RAIL — keep shopping + reweigh (unique button placement) */
body.page-a99-weighbridge .wg-rail {
  position: sticky;
  top: calc(var(--cf-nav-h) + 12px);
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 10px 8px;
  background: var(--cf-asphalt);
  border: 3px solid #000;
  box-shadow: 4px 4px 0 var(--cf-signal);
  min-height: 280px;
}
body.page-a99-weighbridge .wg-exit {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--cf-signal);
  padding: 10px 4px;
  border: 2px dashed rgba(255, 230, 0, 0.45);
  transition: background 160ms ease, color 160ms ease;
}
body.page-a99-weighbridge .wg-exit:hover {
  background: var(--cf-signal);
  color: var(--cf-signal-ink);
}
body.page-a99-weighbridge .wg-exit-arrow {
  font-size: 1.2rem;
  font-weight: 800;
}
body.page-a99-weighbridge .wg-exit-label {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.2;
}
body.page-a99-weighbridge .wg-reweigh {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  margin-top: auto;
  border: 2px solid #000;
  background: var(--cf-cone);
  color: var(--cf-on-cone);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 12px 6px;
  cursor: pointer;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  transition: transform 180ms var(--wg-ease), box-shadow 180ms ease;
  box-shadow: 0 0 0 0 var(--cf-signal);
}
body.page-a99-weighbridge .wg-reweigh:hover {
  box-shadow: 0 0 0 3px var(--cf-signal);
}
body.page-a99-weighbridge .wg-reweigh-bolt {
  writing-mode: horizontal-tb;
  transform: rotate(180deg);
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: radial-gradient(circle at 35% 35%, #fff, #6A737A 55%, #1a1a1a);
  border: 1px solid #000;
  flex: 0 0 auto;
}
body.page-a99-weighbridge .wg-rail-note {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  margin: 0;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--cf-soft-on-dark);
  line-height: 1.35;
}

body.page-a99-weighbridge .wg-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-width: 0;
}

/* Empty gate */
body.page-a99-weighbridge .wg-empty {
  text-align: center;
  padding: 56px 24px;
  background: var(--cf-surface);
  border: 3px solid var(--cf-asphalt);
  box-shadow: 5px 5px 0 var(--cf-asphalt);
}
body.page-a99-weighbridge .wg-empty-gate {
  width: 120px;
  height: 28px;
  margin: 0 auto 18px;
  background: var(--cf-cone);
  border: 3px solid #000;
  position: relative;
  transform: skewX(-18deg);
}
body.page-a99-weighbridge .wg-empty-gate::before,
body.page-a99-weighbridge .wg-empty-gate::after {
  content: "";
  position: absolute;
  top: -18px;
  width: 10px;
  height: 18px;
  background: var(--cf-asphalt);
  border: 2px solid #000;
}
body.page-a99-weighbridge .wg-empty-gate::before { left: 16px; }
body.page-a99-weighbridge .wg-empty-gate::after { right: 16px; }
body.page-a99-weighbridge .wg-empty h2 {
  margin: 0 0 8px;
  font-family: var(--cf-font-display);
  font-size: 1.6rem;
  font-weight: 400;
}
body.page-a99-weighbridge .wg-empty p {
  margin: 0 0 22px;
  color: var(--cf-mute);
  font-weight: 500;
}

/* Docket tickets */
body.page-a99-weighbridge .wg-docket {
  background: var(--cf-surface);
  border: 3px solid var(--cf-asphalt);
  box-shadow: 5px 5px 0 var(--cf-asphalt);
  overflow: hidden;
}
body.page-a99-weighbridge .wg-docket-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background:
    repeating-linear-gradient(
      -45deg,
      var(--cf-signal) 0 8px,
      var(--cf-asphalt) 8px 16px
    );
  color: #fff;
}
body.page-a99-weighbridge .wg-docket-head > div {
  background: var(--cf-asphalt);
  padding: 8px 12px;
  border: 2px solid #000;
}
body.page-a99-weighbridge .wg-docket-head h2 {
  margin: 0;
  font-family: var(--cf-font-display);
  font-size: 1.2rem;
  font-weight: 400;
}
body.page-a99-weighbridge .wg-docket-head p {
  margin: 4px 0 0;
  font-size: 0.85rem;
  color: var(--cf-soft-on-dark);
  font-weight: 600;
}
body.page-a99-weighbridge .wg-docket-code {
  font-family: var(--cf-font-display);
  font-size: 0.85rem;
  padding: 6px 10px;
  background: var(--cf-tape);
  color: var(--cf-asphalt);
  border: 2px solid #000;
}

body.page-a99-weighbridge .wg-tickets {
  list-style: none;
  margin: 0;
  padding: 0;
}
body.page-a99-weighbridge .wg-ticket {
  position: relative;
  display: grid;
  grid-template-columns: 12px 52px 84px 1fr auto;
  gap: 12px;
  align-items: center;
  padding: 16px 56px 16px 10px;
  border-bottom: 2px dashed var(--cf-border-strong);
  background:
    linear-gradient(90deg, #f4f1ea 0 12px, transparent 12px);
  opacity: 0;
  transform: translateX(-16px);
  animation: wgTicketIn 420ms var(--wg-ease) forwards;
  animation-delay: calc(var(--wg-i, 0) * 70ms);
}
body.page-a99-weighbridge .wg-ticket:last-child { border-bottom: 0; }
body.page-a99-weighbridge .wg-ticket.is-dumping {
  opacity: 0;
  transform: translateX(48px) rotate(1.5deg);
  transition: opacity 260ms ease, transform 260ms var(--wg-ease);
  pointer-events: none;
  animation: none;
}
body.page-a99-weighbridge .wg-ticket-perf {
  width: 12px;
  height: 100%;
  min-height: 88px;
  background:
    radial-gradient(circle, var(--cf-field) 0 3px, transparent 3.5px) 50% 0 / 12px 12px;
}

/* Vertical qty stack on LEFT — unlike horizontal ± peers */
body.page-a99-weighbridge .wg-qty {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  border: 2px solid var(--cf-asphalt);
  background: var(--cf-field);
  overflow: hidden;
}
body.page-a99-weighbridge .wg-qty button {
  height: 28px;
  border: 0;
  background: transparent;
  font-weight: 800;
  font-size: 1rem;
  cursor: pointer;
  color: var(--cf-ink);
}
body.page-a99-weighbridge .wg-qty button:hover { background: var(--cf-signal); }
body.page-a99-weighbridge .wg-qty input {
  width: 100%;
  height: 32px;
  border: 0;
  border-block: 2px solid var(--cf-asphalt);
  text-align: center;
  font-weight: 800;
  background: var(--cf-surface);
  -moz-appearance: textfield;
}
body.page-a99-weighbridge .wg-qty input::-webkit-outer-spin-button,
body.page-a99-weighbridge .wg-qty input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
body.page-a99-weighbridge .wg-qty.is-flash { animation: wgQtyFlash 360ms ease; }

body.page-a99-weighbridge .wg-ticket-thumb {
  display: block;
  width: 84px;
  height: 84px;
  border: 2px solid var(--cf-asphalt);
  background: var(--cf-field);
  overflow: hidden;
}
body.page-a99-weighbridge .wg-ticket-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
body.page-a99-weighbridge .wg-ticket-ph {
  display: block;
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(-45deg, var(--cf-signal) 0 6px, var(--cf-asphalt) 6px 12px);
}
body.page-a99-weighbridge .wg-ticket-info { min-width: 0; }
body.page-a99-weighbridge .wg-ticket-num {
  display: inline-block;
  font-family: var(--cf-font-display);
  font-size: 0.78rem;
  color: var(--cf-text-cone);
  margin-bottom: 2px;
}
body.page-a99-weighbridge .wg-ticket-info h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.25;
}
body.page-a99-weighbridge .wg-ticket-info h3 a {
  text-decoration: none;
  color: inherit;
}
body.page-a99-weighbridge .wg-ticket-info h3 a:hover { color: var(--cf-text-cone); }
body.page-a99-weighbridge .wg-ticket-meta {
  margin: 0 0 4px;
  font-size: 0.85rem;
  color: var(--cf-mute);
  font-weight: 600;
}
body.page-a99-weighbridge .wg-ticket-unit {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--cf-text-tape);
}
body.page-a99-weighbridge .wg-ticket-total {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--cf-ink);
  white-space: nowrap;
}

/* Tear-off remove — corner tab, not underline under qty */
body.page-a99-weighbridge .wg-tear {
  position: absolute;
  top: 0;
  right: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 0;
  border-left: 2px solid #000;
  border-bottom: 2px solid #000;
  background: var(--cf-signal);
  color: var(--cf-signal-ink);
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  cursor: pointer;
  clip-path: polygon(12px 0, 100% 0, 100% 100%, 0 100%);
}
body.page-a99-weighbridge .wg-tear:hover { background: var(--cf-cone); color: var(--cf-on-cone); }

/* Caution flap promo — no twin card pair under items */
body.page-a99-weighbridge .wg-flap {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 0;
  border: 3px solid #000;
  background: var(--cf-cone);
  box-shadow: 4px 4px 0 var(--cf-asphalt);
  transform-origin: top center;
  animation: wgFlapDown 500ms var(--wg-ease) both;
}
body.page-a99-weighbridge .wg-flap-ship,
body.page-a99-weighbridge .wg-flap-code {
  padding: 18px 18px 16px;
  color: var(--cf-on-cone);
}
body.page-a99-weighbridge .wg-flap-code {
  background: rgba(0, 0, 0, 0.12);
  border-left: 2px dashed rgba(0, 0, 0, 0.35);
}
body.page-a99-weighbridge .wg-flap h3 {
  margin: 0 0 8px;
  font-family: var(--cf-font-display);
  font-size: 1.05rem;
  font-weight: 400;
}
body.page-a99-weighbridge .wg-flap-ship p {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
}
body.page-a99-weighbridge .wg-flap-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
body.page-a99-weighbridge .wg-flap-row input {
  flex: 1 1 120px;
  min-height: 44px;
  padding: 0 12px;
  border: 2px solid #000;
  background: #fff;
  color: var(--cf-ink);
  font-weight: 600;
}
body.page-a99-weighbridge .wg-chip {
  border: 2px solid #000;
  background: var(--cf-asphalt);
  color: var(--cf-signal);
  font-weight: 800;
  padding: 0 14px;
  min-height: 44px;
  cursor: pointer;
}
body.page-a99-weighbridge .wg-chip:hover { background: var(--cf-signal); color: var(--cf-signal-ink); }
body.page-a99-weighbridge .wg-flap-note {
  margin: 10px 0 0;
  font-size: 0.85rem;
  font-weight: 700;
}
body.page-a99-weighbridge .wg-flap-note.is-ok { color: #004d2e; }
body.page-a99-weighbridge .wg-flap-note.is-err { color: #5c0018; }
body.page-a99-weighbridge .wg-flap.is-ok { outline: 3px solid var(--cf-ok); }
body.page-a99-weighbridge .wg-flap.is-err { outline: 3px solid var(--cf-err); }

/* Weighbridge — horizontal strip + ONE full-bleed gate CTA */
body.page-a99-weighbridge .wg-bridge {
  background: var(--cf-asphalt);
  color: #fff;
  border: 3px solid #000;
  box-shadow: 5px 5px 0 #000;
  padding: 0 0 18px;
  overflow: hidden;
}
body.page-a99-weighbridge .wg-bridge-kicker {
  margin: 0;
  padding: 10px 18px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--cf-signal-ink);
  background: var(--cf-signal);
  border-bottom: 3px solid #000;
}
body.page-a99-weighbridge .wg-strip {
  list-style: none;
  margin: 0;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
body.page-a99-weighbridge .wg-strip li {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px;
  border: 2px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
}
body.page-a99-weighbridge .wg-strip li span {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cf-soft-on-dark);
}
body.page-a99-weighbridge .wg-strip li strong {
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
}
body.page-a99-weighbridge .wg-strip li.is-due {
  border-color: var(--cf-signal);
  background: rgba(255, 230, 0, 0.1);
}
body.page-a99-weighbridge .wg-strip li.is-due strong {
  font-family: var(--cf-font-display);
  font-size: 1.45rem;
  color: var(--cf-signal);
}
body.page-a99-weighbridge .wg-bridge-note {
  margin: 0 18px 14px;
  font-size: 0.85rem;
  color: var(--cf-soft-on-dark);
  font-weight: 500;
}

/* Full-bleed diagonal gate — sole primary button under totals */
body.page-a99-weighbridge .wg-gate {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 18px;
  min-height: 64px;
  padding: 12px 18px;
  text-decoration: none;
  color: var(--cf-on-cone);
  background: var(--cf-cone);
  border: 3px solid #000;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 4px 4px 0 var(--cf-signal);
  transition: transform 180ms var(--wg-ease), box-shadow 180ms ease;
}
body.page-a99-weighbridge .wg-gate:hover,
body.page-a99-weighbridge .wg-gate:focus-visible {
  transform: translate(-2px, -2px);
  box-shadow: 6px 6px 0 var(--cf-signal);
  outline: none;
}
body.page-a99-weighbridge .wg-gate-arm {
  position: absolute;
  inset: 0;
  background: linear-gradient(105deg, transparent 42%, rgba(255, 230, 0, 0.45) 50%, transparent 58%);
  transform: translateX(-120%);
  transition: transform 420ms ease;
  z-index: 0;
}
body.page-a99-weighbridge .wg-gate:hover .wg-gate-arm { transform: translateX(120%); }
body.page-a99-weighbridge .wg-gate-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
body.page-a99-weighbridge .wg-gate-copy em {
  font-style: normal;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.85;
}
body.page-a99-weighbridge .wg-gate-copy strong {
  font-family: var(--cf-font-display);
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.1;
}
body.page-a99-weighbridge .wg-gate-chev {
  position: relative;
  z-index: 1;
  font-size: 1.4rem;
  font-weight: 800;
}
body.page-a99-weighbridge .wg-gate--solo {
  display: inline-flex;
  margin: 0 auto;
  max-width: 360px;
  width: 100%;
}

/* Text curb link — not a second ghost button twin */
body.page-a99-weighbridge .wg-curb {
  display: inline-block;
  margin: 12px 18px 0;
  color: var(--cf-tape);
  font-size: 0.88rem;
  font-weight: 800;
  text-decoration: none;
  letter-spacing: 0.04em;
  border-bottom: 2px solid transparent;
}
body.page-a99-weighbridge .wg-curb:hover {
  color: var(--cf-signal);
  border-bottom-color: var(--cf-signal);
}

body.page-a99-weighbridge .wg-trail {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 20px;
  padding-top: 8px;
  border-top: 1px dashed var(--cf-border-strong);
}
body.page-a99-weighbridge .wg-trail a {
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--cf-mute);
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
body.page-a99-weighbridge .wg-trail a:hover { color: var(--cf-text-cone); }

@keyframes wgTicketIn {
  to { opacity: 1; transform: translateX(0); }
}
@keyframes wgFlapDown {
  from { transform: perspective(600px) rotateX(-28deg); opacity: 0.4; }
  to { transform: perspective(600px) rotateX(0); opacity: 1; }
}
@keyframes wgQtyFlash {
  0%, 100% { background: var(--cf-field); }
  40% { background: var(--cf-signal); }
}

@media (max-width: 860px) {
  body.page-a99-weighbridge .wg-yard {
    grid-template-columns: 1fr;
  }
  body.page-a99-weighbridge .wg-rail {
    position: static;
    flex-direction: row;
    align-items: stretch;
    min-height: 0;
    padding: 10px;
  }
  body.page-a99-weighbridge .wg-exit,
  body.page-a99-weighbridge .wg-reweigh {
    flex: 1;
    writing-mode: horizontal-tb;
    transform: none;
    flex-direction: row;
    justify-content: center;
    min-height: 48px;
  }
  body.page-a99-weighbridge .wg-exit-label {
    writing-mode: horizontal-tb;
    transform: none;
  }
  body.page-a99-weighbridge .wg-reweigh-bolt {
    writing-mode: horizontal-tb;
    transform: none;
  }
  body.page-a99-weighbridge .wg-rail-note { display: none; }
  body.page-a99-weighbridge .wg-flap,
  body.page-a99-weighbridge .wg-strip {
    grid-template-columns: 1fr;
  }
  body.page-a99-weighbridge .wg-flap-code { border-left: 0; border-top: 2px dashed rgba(0, 0, 0, 0.35); }
  body.page-a99-weighbridge .wg-ticket {
    grid-template-columns: 8px 48px 72px 1fr;
    grid-template-rows: auto auto;
    padding-right: 16px;
    padding-top: 36px;
  }
  body.page-a99-weighbridge .wg-ticket-total {
    grid-column: 3 / -1;
    justify-self: start;
  }
}
@media (max-width: 480px) {
  body.page-a99-weighbridge .wg-ticket {
    grid-template-columns: 48px 64px 1fr;
  }
  body.page-a99-weighbridge .wg-ticket-perf { display: none; }
  body.page-a99-weighbridge .wg-ticket-thumb { width: 64px; height: 64px; }
  body.page-a99-weighbridge .wg-flap-row .wg-chip { width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  body.page-a99-weighbridge .wg-ticket,
  body.page-a99-weighbridge .wg-flap,
  body.page-a99-weighbridge .wg-gate,
  body.page-a99-weighbridge .wg-qty {
    animation: none !important;
    transition: none !important;
  }
}
