/* Veryplants Wholesale v2 — token overrides
   Loads AFTER ../colors_and_type.css and ../wholesale_site/site.css.
   These are the production-locked corrections from V2_DELTAS:
     - Orange CTA accessibility fix (ink-on-orange, not white-on-orange)
     - Trade-green-700 for "Add to cart" (passes AA on white)
     - --vp-link separated from --vp-orange (link green ≠ button orange)
     - --vp-orange-700 darker variant for warning states
     - --vp-orange-200 light tint for chip backgrounds
     - --vp-error red for expired-cert / overdue states
     - --vp-line-strong for stronger borders */

:root {
  /* Re-declare to be safe — production canon */
  --vp-orange:        #FFAB54;   /* surface — never used as text on white */
  --vp-orange-200:    #FFE3C7;   /* light tint, chips/banners */
  --vp-orange-700:    #C56F18;   /* AA-on-white text variant; warning state */

  --vp-link:          #2F6B41;   /* trade green for inline links — NOT orange */
  --vp-link-hover:    #1F4D2C;

  --vp-trade-green:    #3A9943;
  --vp-trade-green-700:#2C7A33;  /* AA-on-white "Add to cart" + success state */

  --vp-error:         #C0392B;   /* expired cert, overdue */
  --vp-success:       #2C7A33;

  --vp-line:          #E5DFD3;
  --vp-line-strong:   #C9C0AD;

  /* Surfaces from v1 stay the same */
  --vp-cream:         #F5EFE3;
  --vp-pink:          #F2D6CC;
  --vp-peach:         #FAD9B6;
  --vp-sage:          #C9D6BC;
}

/* === Button overrides ================================================== */
/* Primary = orange surface, INK text (the production fix) */
.btn--primary {
  background: var(--vp-orange);
  color: var(--vp-ink);
  border-color: var(--vp-orange);
}
.btn--primary:hover {
  background: var(--vp-orange-700);
  color: white;
  border-color: var(--vp-orange-700);
}
.btn--primary:focus-visible {
  outline: 3px solid var(--vp-orange-700);
  outline-offset: 2px;
}

/* Trade = "Add to cart" — trade-green-700, passes AA on white */
.btn--trade {
  background: var(--vp-trade-green-700);
  color: white;
  border-color: var(--vp-trade-green-700);
}
.btn--trade:hover {
  background: var(--vp-link-hover);
  border-color: var(--vp-link-hover);
}

/* Secondary remains ink-bordered */
.btn--secondary {
  background: white;
  color: var(--vp-ink);
  border-color: var(--vp-ink);
}
.btn--secondary:hover {
  background: var(--vp-ink);
  color: white;
}

.btn--ghost {
  background: transparent;
  color: var(--vp-ink);
  border-color: transparent;
  font-weight: 600;
}
.btn--ghost:hover { color: var(--vp-link); background: rgba(0,0,0,0.04); }

/* === Status pills ====================================================== */
.status { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; }
.status::before { content: ''; width: 6px; height: 6px; border-radius: 999px; background: currentColor; }
.status--paid       { background: rgba(44,122,51,0.12);  color: var(--vp-trade-green-700); }
.status--open       { background: rgba(197,111,24,0.12); color: var(--vp-orange-700); }
.status--overdue    { background: rgba(192,57,43,0.10);  color: var(--vp-error); }
.status--draft      { background: rgba(0,0,0,0.06);      color: var(--vp-muted); }
.status--partial    { background: rgba(197,111,24,0.10); color: var(--vp-orange-700); }
.status--processing { background: rgba(47,107,65,0.10);  color: var(--vp-link); }
.status--shipped    { background: rgba(44,122,51,0.10);  color: var(--vp-trade-green-700); }
.status--applied    { background: rgba(44,122,51,0.10);  color: var(--vp-trade-green-700); }
.status--unapplied  { background: rgba(197,111,24,0.10); color: var(--vp-orange-700); }

/* === Login-state visibility ============================================ */
body:not(.is-logged-in) .show-in { display: none !important; }
body.is-logged-in       .show-out { display: none !important; }

/* === Reseller bar (in-app top strip) =================================== */
.rbar { background: var(--vp-ink); color: white; font-size: 12px; padding: 8px 0; display: none; }
body.is-logged-in .rbar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-left: 32px; padding-right: 32px; }
.rbar .pill { background: var(--vp-orange); color: var(--vp-ink); padding: 2px 10px; border-radius: 999px; font-weight: 700; letter-spacing: 0.04em; font-size: 11px; }
.rbar .left, .rbar .right { display: flex; align-items: center; gap: 14px; }
.rbar a { color: white; text-decoration: none; opacity: 0.85; }
.rbar a:hover { opacity: 1; text-decoration: underline; }

/* === Region switcher (header) ========================================== */
.vp-region { position: relative; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; color: var(--vp-ink); padding: 6px 10px; border: 1px solid var(--vp-line); border-radius: 6px; cursor: pointer; }
.vp-region:hover { border-color: var(--vp-ink); }
.vp-region .flag { font-size: 14px; line-height: 1; }
.vp-region select { appearance: none; -webkit-appearance: none; background: transparent; border: 0; font: inherit; color: inherit; padding-right: 14px; cursor: pointer; }
.vp-region::after { content: '▾'; position: absolute; right: 10px; top: 50%; transform: translateY(-50%); font-size: 9px; color: var(--vp-muted); pointer-events: none; }

/* === Draft-content watermark (toggleable) ============================= */
[data-content-status="draft"] { position: relative; }
body.vp-show-drafts [data-content-status="draft"]::after {
  content: 'DRAFT — not approved for publish';
  position: absolute; top: 6px; right: 6px;
  background: var(--vp-orange);
  color: var(--vp-ink);
  font-size: 10px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 3px;
  z-index: 5;
  pointer-events: none;
}
body.vp-show-drafts [data-content-status="draft"] {
  outline: 1px dashed var(--vp-orange-700);
  outline-offset: 4px;
}

/* === Dev pill ========================================================= */
.vp-dev-pill { position: fixed; bottom: 18px; left: 18px; z-index: 9999; display: inline-flex; align-items: center; gap: 8px; background: var(--vp-ink); color: white; border: none; font-family: var(--font-body); font-size: 12px; font-weight: 600; padding: 8px 14px; border-radius: 999px; cursor: pointer; box-shadow: 0 4px 12px rgba(0,0,0,0.14); }
.vp-dev-pill:hover { background: var(--vp-link-hover); }
.vp-dev-pill .dot { width: 7px; height: 7px; border-radius: 999px; background: var(--vp-line-strong); }
body.vp-show-drafts .vp-dev-pill .dot { background: var(--vp-orange); }

/* === Login/logout visibility helpers tightening ====================== */
.cart-pill { position: relative; display: inline-flex; align-items: center; }
.cart-pill .n { position: absolute; top: -4px; right: -4px; background: var(--vp-orange); color: var(--vp-ink); font-size: 10px; font-weight: 800; min-width: 16px; height: 16px; border-radius: 999px; display: grid; place-items: center; padding: 0 4px; }
