/*
 * The gift vouchers page.
 *
 * This page was not in the approved export, so its rules live here rather
 * than in style.css. It answers to .pwsgo-vouchers and borrows the inner
 * pages' palette and typography through .pwsgo-policy, which is set on <html>
 * beside it, the same way the send page borrows the enquiry page's.
 *
 * The field and pill shapes are the ones already on the site, copied rather
 * than inherited, because the enquiry page's stylesheet brings a whole layout
 * with it and this page only wants the boxes.
 */

:root:where(.pwsgo-vouchers) {
  --err:#A3271C;
}

/*
 * Put away. Not the hidden attribute: this page is drawn by the design's own
 * runtime, which drops bare attributes it does not recognise when it
 * re-renders, and the whole confirmation came back on show.
 */
:where(.pwsgo-vouchers) .pwv-away {
  display:none !important;
}

:where(.pwsgo-vouchers) .kick {
  font:600 12px/1 'IBM Plex Sans', system-ui, sans-serif;
  letter-spacing:0.12em;
  text-transform:uppercase;
  color:var(--accent-dark);
  margin:0;
}

/* ---------------------------------------------------------------- layout */

:where(.pwsgo-vouchers) .pwv-buy {
  display:grid;
  grid-template-columns:minmax(0, 1fr) 280px;
  gap:clamp(24px, 4vw, 48px);
  align-items:start;
  margin-top:clamp(24px, 4vw, 40px);
}

:where(.pwsgo-vouchers) .pwv-form {
  margin:0;
  min-width:0;
}

:where(.pwsgo-vouchers) .pwv-step {
  background:#fff;
  border:1px solid var(--rule);
  border-radius:var(--r);
  padding:clamp(20px, 3vw, 32px);
}

:where(.pwsgo-vouchers) .pwv-step .blk-h {
  margin:0 0 20px;
}

/* ------------------------------------------------------------- the rail */

:where(.pwsgo-vouchers) .pwv-rail {
  display:flex;
  gap:8px;
  margin:0 0 18px;
  padding:0;
  list-style:none;
  counter-reset:none;
}

:where(.pwsgo-vouchers) .pwv-rail-step {
  flex:1 1 0;
  display:flex;
  align-items:center;
  gap:9px;
  min-width:0;
  padding:11px 14px;
  border-radius:999px;
  background:var(--well);
  color:var(--ink-faint);
  font:500 13.5px/1.2 'IBM Plex Sans', system-ui, sans-serif;
}

:where(.pwsgo-vouchers) .pwv-rail-num {
  flex:none;
  display:grid;
  place-items:center;
  width:23px;
  height:23px;
  border-radius:50%;
  background:var(--stone);
  color:#fff;
  font-size:12px;
  font-weight:700;
}

:where(.pwsgo-vouchers) .pwv-rail-name {
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

:where(.pwsgo-vouchers) .pwv-rail-step.is-on {
  background:var(--accent-wash);
  color:var(--ink);
  box-shadow:inset 0 0 0 1.5px var(--accent-dark);
}

:where(.pwsgo-vouchers) .pwv-rail-step.is-on .pwv-rail-num {
  background:var(--accent-dark);
}

/* A step already done can be gone back to, so it looks like a thing you can
   press. One not reached yet does not. */
:where(.pwsgo-vouchers) .pwv-rail-step.is-done {
  color:var(--ink);
  cursor:pointer;
}

:where(.pwsgo-vouchers) .pwv-rail-step.is-done .pwv-rail-num {
  background:var(--accent);
}

:where(.pwsgo-vouchers) .pwv-rail-step.is-done .pwv-rail-num::before {
  content:"\2713";
}

:where(.pwsgo-vouchers) .pwv-rail-step.is-done .pwv-rail-num {
  font-size:13px;
  color:#fff;
}

/* ------------------------------------------------------------ the amounts */

:where(.pwsgo-vouchers) .pwv-amounts {
  display:grid;
  grid-template-columns:repeat(auto-fit, minmax(108px, 1fr));
  gap:12px;
}

:where(.pwsgo-vouchers) .pwv-amount {
  position:relative;
  min-height:62px;
  padding:16px 14px;
  border:1.5px solid var(--rule);
  border-radius:8px;
  background:#fff;
  color:var(--ink);
  font:600 19px/1 'IBM Plex Sans', system-ui, sans-serif;
  cursor:pointer;
}

:where(.pwsgo-vouchers) .pwv-amount:hover {
  border-color:rgba(7, 31, 62, 0.34);
}

:where(.pwsgo-vouchers) .pwv-amount:focus-visible {
  outline:3px solid var(--accent-dark);
  outline-offset:2px;
}

:where(.pwsgo-vouchers) .pwv-amount.is-on {
  border-color:var(--accent-dark);
  background:var(--accent-wash);
  box-shadow:inset 0 0 0 1px var(--accent-dark);
}

/* The one the owner marked as the suggested amount, if he marked one. */
:where(.pwsgo-vouchers) .pwv-flag {
  position:absolute;
  left:50%;
  top:-9px;
  transform:translateX(-50%);
  white-space:nowrap;
  padding:3px 9px;
  border-radius:999px;
  background:var(--gold);
  color:var(--ink);
  font:600 10.5px/1 'IBM Plex Sans', system-ui, sans-serif;
  letter-spacing:0.06em;
  text-transform:uppercase;
}

:where(.pwsgo-vouchers) .pwv-note {
  margin:22px 0 0;
  padding:14px 16px;
  background:var(--well);
  border-left:3px solid var(--accent-dark);
  border-radius:0 var(--r) var(--r) 0;
  font-size:14.5px;
  line-height:1.6;
  color:var(--ink-soft);
}

/* --------------------------------------------------------------- the boxes */

:where(.pwsgo-vouchers) .inp {
  width:100%;
  min-height:52px;
  border:1.5px solid var(--rule);
  border-radius:8px;
  background:#fff;
  padding:14px 16px;
  font:400 16px/1.4 'IBM Plex Sans', system-ui, sans-serif;
  color:var(--ink);
  box-sizing:border-box;
}

:where(.pwsgo-vouchers) .inp:hover {
  border-color:rgba(7, 31, 62, 0.34);
}

:where(.pwsgo-vouchers) .inp:focus {
  outline:3px solid var(--accent-dark);
  outline-offset:2px;
  border-color:var(--accent-dark);
}

:where(.pwsgo-vouchers) .lab {
  display:block;
  font:500 14.5px/1.4 'IBM Plex Sans', system-ui, sans-serif;
  margin-bottom:7px;
}

:where(.pwsgo-vouchers) .pwv-hint {
  margin:7px 0 0;
  font:400 13.5px/1.55 'IBM Plex Sans', system-ui, sans-serif;
  color:var(--ink-faint);
}

:where(.pwsgo-vouchers) .pwv-mid {
  text-align:center;
}

:where(.pwsgo-vouchers) .pwv-grid {
  display:grid;
  grid-template-columns:repeat(2, minmax(0, 1fr));
  gap:16px;
}

:where(.pwsgo-vouchers) .fld {
  margin:0;
}

:where(.pwsgo-vouchers) .pwv-wide {
  margin-top:16px;
}

:where(.pwsgo-vouchers) .pwv-message {
  min-height:0;
  resize:vertical;
}

:where(.pwsgo-vouchers) .pwv-tick {
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin-top:18px;
  font-size:15px;
  line-height:1.5;
  cursor:pointer;
}

:where(.pwsgo-vouchers) .pwv-tick input {
  flex:none;
  width:20px;
  height:20px;
  margin-top:1px;
  accent-color:var(--accent-dark);
}

:where(.pwsgo-vouchers) .pwv-tick.is-off {
  color:var(--ink-faint);
  cursor:default;
}

/* --------------------------------------------------------------- paying */

:where(.pwsgo-vouchers) .pwv-sum {
  border:1px solid var(--rule);
  border-radius:var(--r);
  background:var(--well);
  padding:clamp(18px, 2.5vw, 24px);
}

:where(.pwsgo-vouchers) .pwv-sum-h {
  margin:0 0 14px;
  font:600 15px/1.2 'IBM Plex Sans', system-ui, sans-serif;
}

:where(.pwsgo-vouchers) .pwv-sum-row {
  display:flex;
  justify-content:space-between;
  gap:16px;
  padding:7px 0;
  font-size:15px;
  color:var(--ink-soft);
}

:where(.pwsgo-vouchers) .pwv-sum-row span:last-child {
  font-weight:600;
  color:var(--ink);
  white-space:nowrap;
}

:where(.pwsgo-vouchers) .pwv-sum-total {
  margin-top:7px;
  padding-top:14px;
  border-top:1px solid var(--stone);
  font:600 clamp(18px, 2vw, 21px)/1.2 'Archivo', system-ui, sans-serif;
  color:var(--ink);
}

:where(.pwsgo-vouchers) .pwv-sum-total span:last-child {
  font-size:inherit;
  color:var(--accent-dark);
}

:where(.pwsgo-vouchers) .pwv-problem {
  margin:0 0 16px;
  padding:12px 14px;
  border:1px solid var(--err);
  border-radius:var(--r);
  background:#FDECEA;
  color:var(--err);
  font:500 14.5px/1.55 'IBM Plex Sans', system-ui, sans-serif;
}

/* -------------------------------------------------------- forward, back */

:where(.pwsgo-vouchers) .pwv-feet {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:12px;
  margin-top:26px;
}

:where(.pwsgo-vouchers) .pwv-pay.is-waiting {
  opacity:0.7;
  cursor:progress;
}

/* ------------------------------------------------------- how it works */

:where(.pwsgo-vouchers) .pwv-points {
  background:var(--well);
  border-radius:var(--r);
  padding:clamp(20px, 2.5vw, 26px);
}

:where(.pwsgo-vouchers) .pwv-points .blk-h {
  margin:0 0 14px;
  font-size:clamp(19px, 1.8vw, 22px);
}

:where(.pwsgo-vouchers) .pwv-points ul {
  margin:0;
  padding:0;
  list-style:none;
  display:flex;
  flex-direction:column;
  gap:12px;
}

:where(.pwsgo-vouchers) .pwv-points li {
  position:relative;
  padding-left:22px;
  font-size:14.5px;
  line-height:1.6;
  color:var(--ink-soft);
}

:where(.pwsgo-vouchers) .pwv-points li::before {
  content:"";
  position:absolute;
  left:0;
  top:7px;
  width:9px;
  height:9px;
  border-radius:50%;
  background:var(--accent);
}

/* ------------------------------------------------------ the confirmation */

:where(.pwsgo-vouchers) .pwv-done {
  margin-top:clamp(24px, 4vw, 40px);
}

:where(.pwsgo-vouchers) .pwv-card {
  background:#fff;
  border:1px solid var(--rule);
  border-radius:var(--r);
  padding:clamp(26px, 4vw, 44px);
  text-align:center;
}

:where(.pwsgo-vouchers) .pwv-card h2 {
  margin:0 0 10px;
  max-width:none;
}

:where(.pwsgo-vouchers) .pwv-card p {
  margin:0 0 10px;
}

:where(.pwsgo-vouchers) .pwv-code-label {
  margin:28px 0 4px !important;
  font:500 12px/1 'IBM Plex Sans', system-ui, sans-serif;
  letter-spacing:0.18em;
  text-transform:uppercase;
  color:var(--ink-faint);
}

:where(.pwsgo-vouchers) .pwv-code {
  margin:0 0 26px !important;
  font:700 clamp(26px, 4vw, 38px)/1.1 'Courier New', Courier, monospace;
  letter-spacing:0.08em;
  color:var(--ink);
}

:where(.pwsgo-vouchers) .pwv-print {
  text-decoration:none;
}

/* The gentlest possible way of saying "a moment". */
:where(.pwsgo-vouchers) .pwv-spin {
  width:26px;
  height:26px;
  margin:0 auto 18px !important;
  border:3px solid var(--stone);
  border-top-color:var(--accent-dark);
  border-radius:50%;
  animation:pwv-turn 0.9s linear infinite;
}

@keyframes pwv-turn {
  to { transform:rotate(360deg); }
}

@media (prefers-reduced-motion:reduce) {
  :where(.pwsgo-vouchers) .pwv-spin {
    animation-duration:3s;
  }
}

/* ------------------------------------------------------------ narrower */

@media (max-width:860px) {
  :where(.pwsgo-vouchers) .pwv-buy {
    grid-template-columns:minmax(0, 1fr);
  }

  /* The panel explains the steps, so below them rather than above. */
  :where(.pwsgo-vouchers) .pwv-points {
    order:2;
  }
}

@media (max-width:560px) {
  :where(.pwsgo-vouchers) .pwv-grid {
    grid-template-columns:minmax(0, 1fr);
  }

  /* The step names do not fit three across on a telephone, so the rail
     becomes the numbers alone and the heading inside the card says which
     step it is. */
  :where(.pwsgo-vouchers) .pwv-rail-name {
    display:none;
  }

  :where(.pwsgo-vouchers) .pwv-rail-step {
    flex:0 0 auto;
    justify-content:center;
    padding:9px 12px;
  }

  :where(.pwsgo-vouchers) .pwv-rail {
    justify-content:flex-start;
  }

  :where(.pwsgo-vouchers) .pwv-feet {
    flex-direction:column-reverse;
    align-items:stretch;
  }

  :where(.pwsgo-vouchers) .pwv-feet .pill {
    width:100%;
    justify-content:center;
  }
}

/* ------------------------------------------------- how it gets to them */

:where(.pwsgo-vouchers) .pwv-how-h {
  margin:0 0 12px;
  font:600 15px/1.2 'IBM Plex Sans', system-ui, sans-serif;
}

:where(.pwsgo-vouchers) .pwv-ways {
  display:flex;
  flex-direction:column;
  gap:12px;
  margin-bottom:24px;
}

:where(.pwsgo-vouchers) .pwv-way {
  display:block;
  position:relative;
  padding:16px 18px 16px 48px;
  border:1.5px solid var(--rule);
  border-radius:var(--r);
  background:#fff;
  cursor:pointer;
}

:where(.pwsgo-vouchers) .pwv-way:hover {
  border-color:rgba(7, 31, 62, 0.34);
}

:where(.pwsgo-vouchers) .pwv-way.is-on {
  border-color:var(--accent-dark);
  background:var(--accent-wash);
  box-shadow:inset 0 0 0 1px var(--accent-dark);
}

/* The real radio, kept where a screen reader and the keyboard expect it. */
:where(.pwsgo-vouchers) .pwv-way input {
  position:absolute;
  left:18px;
  top:19px;
  width:19px;
  height:19px;
  margin:0;
  accent-color:var(--accent-dark);
}

:where(.pwsgo-vouchers) .pwv-way-t {
  display:block;
  font:600 16px/1.3 'IBM Plex Sans', system-ui, sans-serif;
}

:where(.pwsgo-vouchers) .pwv-way-s {
  display:block;
  margin-top:4px;
  font-size:14px;
  line-height:1.55;
  color:var(--ink-soft);
}

:where(.pwsgo-vouchers) .pwv-way-f {
  display:inline-block;
  margin-top:10px;
  padding:4px 10px;
  border-radius:999px;
  font:600 11.5px/1.3 'IBM Plex Sans', system-ui, sans-serif;
}

:where(.pwsgo-vouchers) .pwv-way-f--go {
  background:#E6F4EA;
  color:#1E6B33;
}

:where(.pwsgo-vouchers) .pwv-way-f--wait {
  background:#FCF3D7;
  color:#8A6116;
}

:where(.pwsgo-vouchers) .pwv-where {
  margin-bottom:24px;
  padding:18px;
  border:1px dashed var(--stone);
  border-radius:var(--r);
  background:var(--well);
}

:where(.pwsgo-vouchers) .pwv-pc {
  text-transform:uppercase;
}
