/* LWN Pro — validation, as a switch you can flip.

   The other two sections show what the product looks like. This one shows what
   a setting does, which needs the opposite of a screenshot: the same screen
   twice, once each way. A merchant deciding whether to leave this on is
   choosing between two experiences, and the only honest way to sell one is to
   show the other.

   The off state is not a caricature. It is what the plugin's own setting text
   describes — nothing checked on the way through, everything arriving together
   at Place order. */

.vd {
  background: var(--color-surface);
  padding: var(--space-70) 40px;
  container-type: inline-size;
  font-family: var(--font-sans);
}
.vd__in {
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(0, 420px);
  gap: 56px;
  align-items: center;
}

/* --- Copy ---------------------------------------------------------------- */

.vd__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-primary);
  margin: 0 0 14px;
}
.vd__title {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--text-2xl);
  line-height: var(--lh-heading);
  letter-spacing: -0.02em;
  color: var(--color-contrast);
  margin: 0 0 14px;
}
.vd__lede {
  max-width: 46ch;
  margin: 0;
  font-size: var(--text-base);
  line-height: var(--lh-body);
  color: var(--color-ink-600);
}

/* --- The switch ---------------------------------------------------------- */

.vd__switch {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.vd__swlabel {
  font-size: var(--text-xs);
  color: var(--color-ink-600);
  margin-right: auto;
}
.vd__toggle {
  flex: none;
  width: 46px;
  height: 26px;
  padding: 3px;
  border-radius: 999px;
  border: 1px solid var(--color-line-300);
  background: #FFFFFF;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}
.vd__toggle.is-on {
  background: var(--color-primary);
  border-color: var(--color-primary);
}
.vd__toggle:focus-visible { outline: 2px solid var(--color-blue-700); outline-offset: 2px; }
.vd__knob {
  display: block;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--color-line-300);
  transition: transform 0.18s ease, background 0.18s ease;
}
.vd__toggle.is-on .vd__knob { transform: translateX(20px); background: #FFFFFF; }
.vd__state {
  font-family: var(--font-mono);
  font-size: var(--text-2xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-ink-400);
  min-width: 26px;
}

/* --- The step ------------------------------------------------------------ */

.vd__card {
  background: #FFFFFF;
  border: 1px solid var(--color-line-200);
  border-radius: 14px;
  padding: 22px 22px 20px;
  box-shadow: 0 14px 34px -28px rgba(23, 24, 26, 0.45);
}
/* The block checkout's stepper, at the top of the card where the real one
   sits. It is the same drawing as the sections above — one product, not three
   different illustrations of it. */
.vd__flow {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  margin: 0 0 22px;
  padding: 0;
  list-style: none;
}
.vd__s {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  min-width: 0;
}
.vd__s::after {
  content: "";
  position: absolute;
  top: 13px;
  left: calc(50% + 18px);
  right: calc(-50% + 18px);
  height: 2px;
  border-radius: 2px;
  background: #E1E6EC;
}
.vd__s:last-child::after { display: none; }
.vd__s.is-done::after { background: var(--color-primary); }

.vd__sd {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  background: #F1F4F7;
  border: 2px solid transparent;
  color: var(--color-ink-400);
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}
.vd__s.is-done .vd__sd {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: #FFFFFF;
}
.vd__s.is-current .vd__sd {
  background: #FFFFFF;
  border-color: var(--color-primary);
  color: var(--color-primary);
  box-shadow: 0 0 0 4px var(--color-accent-tint);
}
.vd__sl {
  font-size: 10.5px;
  line-height: 1.3;
  text-align: center;
  color: var(--color-ink-400);
}
.vd__s.is-done .vd__sl,
.vd__s.is-current .vd__sl {
  font-weight: var(--weight-semibold);
  color: var(--color-contrast);
}

/* A class that sets display beats the browser's [hidden] rule, so hiding these
   with the attribute alone did nothing and the fields stayed on screen at the
   review step. Both hidden blocks say so explicitly. */
.vd__fields { display: flex; flex-direction: column; gap: 14px; }
.vd__fields[hidden], .vd__summary[hidden], .vd__skgroup[hidden] { display: none; }
.vd__f { display: block; }
.vd__fl {
  display: block;
  margin-bottom: 6px;
  font-size: var(--text-xs);
  color: var(--color-ink-600);
}
.vd__fl em { font-style: normal; color: var(--color-error); }
.vd__fi {
  width: 100%;
  height: 38px;
  padding: 0 12px;
  border-radius: 7px;
  border: 1px solid var(--color-line-200);
  background: #FFFFFF;
  font-family: inherit;
  font-size: var(--text-sm);
  color: var(--color-contrast);
  cursor: default;
}
.vd__f.is-invalid .vd__fi {
  border-color: var(--color-error);
  background: #FDF5F4;
}
/* Same trap as the fields above: the class sets display, so [hidden] needs
   saying or the error shows before anyone has pressed Next. */
.vd__err[hidden] { display: none; }
.vd__err {
  display: block;
  margin-top: 6px;
  font-size: var(--text-xs);
  color: var(--color-error);
}

/* A short shake, replayed on every press. Long enough to notice the field,
   short enough not to feel like a scolding. */
.vd__f.is-shake { animation: vd-shake 0.32s ease; }
@keyframes vd-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-4px); }
  60% { transform: translateX(3px); }
}

/* The later steps, sketched. Something has to occupy the card once the fields
   are gone, and a blank panel would read as a bug rather than a later step.
   Delivery gets shipping options, Review gets a summary — the same two screens
   the customer would actually pass through. */
.vd__summary { padding: 4px 0 2px; }
.vd__skgroup { display: flex; flex-direction: column; gap: 10px; }
.vd__skopt {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border: 1px solid var(--color-line-200);
  border-radius: 7px;
}
.vd__skopt i {
  flex: none;
  width: 13px; height: 13px;
  border-radius: 50%;
  border: 1.5px solid var(--color-line-300);
}
.vd__skopt b { display: block; width: 46%; height: 8px; border-radius: 4px; background: #EDF0F4; }
.vd__skopt.is-picked {
  border-color: var(--color-accent-tint-border);
  background: var(--color-accent-tint);
}
.vd__skopt.is-picked i { border: 4px solid var(--color-primary); }
.vd__sk {
  display: block;
  height: 9px;
  border-radius: 4px;
  background: #EDF0F4;
}
.vd__sk.is-short { width: 62%; }
.vd__skrow { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 4px; }
.vd__skrow i { display: block; width: 34%; height: 9px; border-radius: 4px; background: #EDF0F4; }
.vd__skrow b { display: block; width: 22%; height: 11px; border-radius: 4px; background: var(--color-accent-tint-border); }

/* --- Notices ------------------------------------------------------------- */

.vd__notice {
  margin: 0 0 16px;
  border-radius: 8px;
  padding: 11px 13px;
  font-size: var(--text-xs);
  line-height: 1.5;
}
/* On: one line, on the step that asked. */
.vd__notice.is-inline {
  background: var(--color-accent-tint);
  border: 1px solid var(--color-accent-tint-border);
  color: var(--color-primary);
}
/* Off: the pile at the end. Deliberately the same visual weight as a real
   WooCommerce error banner — the point lands because it looks like the thing
   a customer actually meets, not a cartoon of it. */
.vd__notice.is-pile {
  display: flex;
  flex-direction: column;
  gap: 4px;
  background: #FDF5F4;
  border: 1px solid #F0C9C4;
  color: var(--color-error);
}
.vd__notice.is-pile strong {
  font-weight: var(--weight-semibold);
  margin-bottom: 2px;
}

/* --- Button -------------------------------------------------------------- */

.vd__nav { display: flex; justify-content: flex-end; margin-top: 18px; }
.vd__btn {
  min-height: 44px;
  padding: 0 20px;
  border-radius: 7px;
  border: 1px solid var(--color-primary);
  background: var(--color-primary);
  color: #FFFFFF;
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  cursor: pointer;
  transition: background 0.16s ease, border-color 0.16s ease;
}
.vd__btn:hover { background: var(--color-primary-hover); border-color: var(--color-primary-hover); }
.vd__btn:focus-visible { outline: 2px solid var(--color-blue-700); outline-offset: 2px; }
.vd__btn.is-final { background: var(--color-contrast); border-color: var(--color-contrast); }

@media (prefers-reduced-motion: reduce) {
  .vd__toggle, .vd__knob, .vd__btn, .vd__sd { transition: none; }
  .vd__f.is-shake { animation: none; }
}

/* --- Narrow -------------------------------------------------------------- */

@container (max-width: 900px) {
  .vd__in { grid-template-columns: 1fr; gap: 34px; }
  .vd__demo { max-width: 460px; }
}
@container (max-width: 560px) {
  .vd { padding: var(--space-60) 20px; }
  .vd__card { padding: 18px 16px 16px; }
  .vd__swlabel { font-size: 11px; }
  .vd__sd { width: 24px; height: 24px; font-size: 11px; box-shadow: none !important; }
  .vd__s::after { top: 11px; left: calc(50% + 15px); right: calc(-50% + 15px); }
  .vd__sl { font-size: 10px; }
}
