/* Checkout — three-step purchase flow, mirrors the original /residential/ layout */

.buy { padding: 44px 0 72px; background: linear-gradient(180deg, var(--tint-2), #fff 420px); }
.buy__head { text-align: center; margin-bottom: 36px; }
.buy__head h1 { margin-bottom: 10px; }
.buy__head p { color: var(--muted); font-size: 18px; }

.buy__grid { display: grid; grid-template-columns: 1fr 372px; gap: 32px; align-items: start; }

.step { background: #fff; border: 1px solid #e6eaf2; border-radius: var(--r-xl); padding: 28px; margin-bottom: 22px; }
.step__head { display: flex; align-items: center; gap: 14px; margin-bottom: 22px; }
.step__n {
  flex: 0 0 auto; width: 34px; height: 34px; border-radius: 50%;
  background: var(--blue); color: #fff; font-weight: 900; font-size: 17px;
  display: grid; place-items: center;
}
.step__head h2 { margin: 0; font-size: 22px; }

/* --- plan cards --- */
/* Package cards.
   The old IP2World store sold on exactly two things: a big volume number and a
   visible gift beside a struck-through price. Small, evenly-weighted tiles read
   as a settings form and nobody looks twice at them, so the volume, the gift and
   the price each get their own tier of emphasis here. */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.plan { position: relative; padding-top: 10px; }
.plan input { position: absolute; opacity: 0; pointer-events: none; }
.plan__box {
  display: flex; flex-direction: column; align-items: center;
  cursor: pointer; height: 100%;
  border: 2px solid #e2e8f5; border-radius: var(--r-lg); padding: 22px 16px 18px;
  text-align: center; background: #fff;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.plan__box:hover { border-color: #b9cdff; box-shadow: 0 8px 22px rgba(13, 22, 38, .07); }
.plan input:checked + .plan__box {
  border-color: var(--blue); background: var(--tint-2);
  box-shadow: 0 10px 26px rgba(60, 127, 255, .2);
}
.plan input:focus-visible + .plan__box { outline: 3px solid rgba(60,127,255,.4); outline-offset: 2px; }

/* volume: the number people scan for */
.plan__vol { display: flex; align-items: baseline; gap: 5px; }
.plan__gb {
  font-size: 42px; font-weight: 900; line-height: 1;
  color: var(--ink-strong); letter-spacing: -1px;
}
.plan__unit { font-size: 15px; font-weight: 800; color: var(--muted-2); }
.plan input:checked + .plan__box .plan__gb { color: var(--blue-ink); }

/* the gift is the offer, so it gets colour and weight, not a footnote */
.plan__gift {
  display: block; margin-top: 9px; font-size: 13px; color: var(--muted);
  line-height: 1.4; min-height: 36px;
}
.plan__gift b {
  display: block; color: #0a7a34; font-weight: 900; font-size: 15px;
  letter-spacing: -.2px;
}
.plan__gift--none { color: var(--muted-2); padding-top: 8px; }

/* price: struck-through original beside the real one, as the original store did */
.plan__prices {
  display: flex; align-items: baseline; justify-content: center; gap: 8px;
  margin-top: 10px;
}
.plan__was { color: var(--muted-2); font-size: 15px; text-decoration-thickness: 1.5px; }
.plan__now { font-size: 26px; font-weight: 900; color: var(--ink-strong); letter-spacing: -.5px; }
.plan__per {
  display: inline-block; margin-top: 8px; font-size: 12.5px; font-weight: 800;
  color: #0a7a34; background: #eaf7ee; border-radius: 999px; padding: 3px 10px;
}
.plan__pick {
  margin-top: auto; padding-top: 14px; font-size: 13px; font-weight: 800;
  color: var(--blue); text-transform: uppercase; letter-spacing: .04em;
}
.plan input:checked + .plan__box .plan__pick { color: var(--blue-ink); }
.plan input:checked + .plan__box .plan__pick::before { content: "\2713\00a0"; }

/* badges sit on the border, so they need the card to have room above it */
.plan__ribbon {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%); z-index: 2;
  background: var(--green); color: #fff; font-size: 11.5px; font-weight: 800;
  padding: 3px 12px; border-radius: 999px; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(13, 22, 38, .12);
}
.plan__ribbon--hot { background: var(--amber); color: #3d2600; }
.plan__ribbon--test { background: #eef1f7; color: var(--muted); box-shadow: none; }

.plan--bonus .plan__box { border-color: #d3e0fb; }
.plan--best .plan__box { border-color: var(--amber); }
.plan--best .plan__box:hover { border-color: #e0a020; }

@media (max-width: 780px) {
  .plans { grid-template-columns: repeat(2, 1fr); gap: 12px; }
  .plan__gb { font-size: 34px; }
  .plan__now { font-size: 22px; }
}
@media (max-width: 420px) {
  .plans { grid-template-columns: 1fr; }
}

.buy__promo {
  max-width: 680px; margin: 14px auto 0; font-size: 16px; line-height: 1.6;
  color: var(--ink); background: #f2f7ff; border: 1px solid #d9e6ff;
  border-radius: var(--r-lg); padding: 14px 18px;
}
.buy__promo b { color: var(--blue-ink); }

/* Only rendered for an account that genuinely has a bonus running out. */
.buy__timer {
  margin: 12px auto 0; font-size: 15px; font-weight: 700; color: #a2560a;
  background: #fff6e6; border: 1px solid #ffe0ad; border-radius: var(--r-lg);
  padding: 10px 16px; display: inline-block;
}
/* display:inline-block would otherwise beat the hidden attribute and show an
   empty clock to visitors who have no bonus running. */
.buy__timer[hidden] { display: none; }
.buy__timer b { font-variant-numeric: tabular-nums; color: #7a3d00; }

.sum__line--gift b { color: var(--green); }
.sum__line--deliver {
  border-top: 1px dashed #e3e9f4; margin-top: 4px; padding-top: 12px;
}
.sum__line--deliver b { font-size: 17px; }

.step--done { opacity: .72; }
.step--done .field, .step--done .field-row { display: none; }

/* --- custom volume --- */
.custom { margin-top: 22px; padding-top: 22px; border-top: 1px dashed #dfe6f3; }
.custom__row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.custom__row label { font-weight: 700; color: var(--ink-strong); }
.custom input[type=range] { flex: 1 1 260px; accent-color: var(--blue); height: 6px; }
.custom__val {
  min-width: 118px; height: 44px; padding: 0 12px; font: inherit; font-weight: 700;
  border: 2px solid #e2e8f5; border-radius: var(--r); text-align: center; color: var(--ink-strong);
}
.custom__val:focus { border-color: var(--blue); outline: none; }
.custom__hint { color: var(--muted-2); font-size: 14px; margin: 10px 0 0; }

/* --- form --- */
.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; font-size: 14.5px; margin-bottom: 6px; color: var(--ink-strong); }
.field input {
  width: 100%; height: 48px; padding: 0 14px; font: inherit;
  border: 2px solid #e2e8f5; border-radius: var(--r); color: var(--ink);
}
.field input:focus { border-color: var(--blue); outline: none; }
.field small { display: block; margin-top: 6px; color: var(--muted-2); font-size: 13px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.switch-note { font-size: 14.5px; color: var(--muted); }

/* --- payment methods --- */
.pms { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.pm { position: relative; }
.pm input { position: absolute; opacity: 0; pointer-events: none; }
.pm__box {
  display: flex; align-items: center; gap: 14px; cursor: pointer; height: 100%;
  border: 2px solid #e2e8f5; border-radius: var(--r-lg); padding: 16px;
  transition: border-color .15s, background .15s;
}
.pm__box:hover { border-color: #b9cdff; }
.pm input:checked + .pm__box { border-color: var(--blue); background: var(--tint-2); }
.pm__ico { display: flex; gap: 6px; align-items: center; }
.pm__ico img { height: 22px; width: auto; }
.pm__t { display: block; font-weight: 700; color: var(--ink-strong); font-size: 15.5px; }
.pm__s { display: block; font-size: 13px; color: var(--muted-2); }

.pm--soon .pm__box { cursor: not-allowed; background: #fafbfd; border-color: #edf0f6; }
.pm--soon .pm__box:hover { border-color: #edf0f6; }
/* dim via colour, not opacity — an opaque parent would fade the badge too */
.pm--soon .pm__ico img { opacity: .45; filter: grayscale(1); }
.pm--soon .pm__t { color: var(--muted); }
.pm--soon .pm__s { color: var(--line); }
.pm__soon {
  display: inline-block; margin-left: 6px; padding: 1px 8px; border-radius: 999px;
  background: var(--amber); color: #3d2600; font-size: 11px; font-weight: 700;
  letter-spacing: .03em; text-transform: uppercase; vertical-align: 1px;
}

/* --- summary --- */
.sum { position: sticky; top: calc(var(--header-h) + 16px); }
.sum__box { background: #fff; border: 1px solid #e6eaf2; border-radius: var(--r-xl); padding: 24px; box-shadow: var(--shadow); }
.sum__box h3 { font-size: 19px; margin-bottom: 18px; }
.sum__line { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; font-size: 15px; color: var(--muted); }
.sum__line b { color: var(--ink-strong); font-weight: 700; }
.sum__total {
  display: flex; justify-content: space-between; align-items: baseline;
  margin-top: 12px; padding-top: 16px; border-top: 1px solid #eaeef6;
}
.sum__total span { font-weight: 700; color: var(--ink-strong); }
.sum__total b { font-size: 30px; font-weight: 900; color: var(--blue-ink); }
.sum .btn { margin-top: 18px; }
.sum__fine { margin: 14px 0 0; font-size: 13px; color: var(--muted-2); text-align: center; }
.sum__err {
  margin: 16px 0 0; padding: 11px 13px; border-radius: var(--r);
  background: #fdeced; border: 1px solid #f3b9bb; color: #a32126;
  font-size: 14px; line-height: 1.45;
}
.sum__promo { display: flex; gap: 8px; margin-top: 14px; }
.sum__promo input {
  flex: 1; height: 42px; padding: 0 12px; font: inherit;
  border: 2px solid #e2e8f5; border-radius: var(--r);
}
.sum__promo input:focus { border-color: var(--blue); outline: none; }
.sum__trust { margin-top: 18px; padding-top: 16px; border-top: 1px solid #eaeef6; }
.sum__trust li { list-style: none; padding: 5px 0 5px 24px; position: relative; font-size: 14px; color: var(--muted); }
.sum__trust ul { margin: 0; padding: 0; }
.sum__trust li::before {
  content: ""; position: absolute; left: 3px; top: 11px; width: 5px; height: 9px;
  border-right: 2px solid var(--green); border-bottom: 2px solid var(--green); transform: rotate(45deg);
}

@media (max-width: 1024px) {
  .buy__grid { grid-template-columns: 1fr; }
  .sum { position: static; }
  .plans { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .plans, .pms, .field-row { grid-template-columns: 1fr; }
  .step { padding: 20px; }
}
