/* ================================================================
   House of Deer — Order overlay (checkout modal)
   Builds on styles.css for type, colours and the .btn-buy button.
   ================================================================ */

.co-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vh, 40px) 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.4s var(--ease), visibility 0.4s;
}
.co-modal.open { opacity: 1; visibility: visible; }

/* blurred scrim — same language as the slide-in menu overlay */
.co-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(3, 4, 10, 0.62);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
}

/* ---------- CARD ---------- */
.co-card {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  max-height: min(88vh, 860px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: clamp(28px, 3.4vw, 40px);
  border-radius: 24px;
  background: linear-gradient(180deg, #12162a 0%, #0b0e1a 62%);
  box-shadow:
    0 50px 120px rgba(0, 0, 0, 0.62),
    inset 0 0 0 1px rgba(var(--ink), 0.08);
  transform: translateY(22px) scale(0.975);
  transition: transform 0.5s var(--ease);
  scrollbar-width: thin;
  scrollbar-color: rgba(var(--ink), 0.18) transparent;
}
.co-modal.open .co-card { transform: none; }
.co-card::-webkit-scrollbar { width: 8px; }
.co-card::-webkit-scrollbar-thumb { background: rgba(var(--ink), 0.16); border-radius: 99px; }

.co-close {
  position: absolute;
  top: 16px; right: 16px;
  width: 34px; height: 34px;
  display: grid; place-items: center;
  border: 0;
  border-radius: 11px;
  background: rgba(var(--ink), 0.06);
  color: rgba(var(--ink), 0.65);
  cursor: pointer;
  transition: background 0.25s var(--ease), color 0.25s var(--ease);
}
.co-close svg {
  width: 15px; height: 15px;
  fill: none; stroke: currentColor;
  stroke-width: 2; stroke-linecap: round;
}
.co-close:hover { background: rgba(var(--ink), 0.13); color: var(--text); }

/* ---------- HEAD ---------- */
.co-head { margin-bottom: 22px; padding-right: 40px; }
.co-eyebrow {
  display: block;
  color: var(--rose);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.co-title {
  font-weight: 500;
  font-size: clamp(1.55rem, 3vw, 2rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
}

/* ---------- PRODUCT SUMMARY ---------- */
.co-summary {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px;
  margin-bottom: 26px;
  border-radius: 16px;
  background: rgba(var(--ink), 0.04);
  box-shadow: inset 0 0 0 1px rgba(var(--ink), 0.07);
}
.co-thumb {
  flex: none;
  width: 62px; height: 62px;
  border-radius: 12px;
  overflow: hidden;
  background: #05070f;
  display: grid; place-items: center;
}
.co-thumb img { width: 100%; height: 100%; object-fit: cover; }
.co-summary-copy { flex: 1 1 auto; min-width: 0; }
.co-product { font-size: 1.05rem; font-weight: 500; line-height: 1.2; }
.co-product-sub {
  color: var(--gray);
  font-size: 0.85rem;
  line-height: 1.3;
  margin-top: 3px;
}

/* quantity stepper */
.co-qty {
  flex: none;
  display: flex;
  align-items: center;
  gap: 2px;
  padding: 4px;
  border-radius: 11px;
  background: rgba(0, 0, 0, 0.35);
  box-shadow: inset 0 0 0 1px rgba(var(--ink), 0.09);
}
.co-qty-btn {
  width: 26px; height: 26px;
  display: grid; place-items: center;
  border: 0; border-radius: 8px;
  background: transparent;
  color: rgba(var(--ink), 0.7);
  font-size: 1rem; line-height: 1;
  font-family: inherit;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
}
.co-qty-btn:hover:not(:disabled) { background: rgba(var(--ink), 0.1); color: var(--text); }
.co-qty-btn:disabled { opacity: 0.3; cursor: default; }
.co-qty-val {
  min-width: 22px;
  text-align: center;
  font-size: 0.95rem;
  font-variant-numeric: tabular-nums;
}

/* ---------- FORM ---------- */
.co-fieldset { border: 0; padding: 0; margin: 0 0 20px; }
.co-legend {
  padding: 0;
  color: var(--gray);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin-bottom: 12px;
}
.co-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.co-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.co-span { grid-column: 1 / -1; }
.co-label {
  font-size: 0.8rem;
  color: rgba(var(--ink), 0.62);
  letter-spacing: 0.01em;
}
.co-optional {
  color: rgba(var(--ink), 0.34);
  font-size: 0.74rem;
  margin-left: 4px;
}
.co-note-field { margin-bottom: 22px; }

.co-field input,
.co-field select,
.co-field textarea {
  width: 100%;
  padding: 12px 14px;
  border-radius: 11px;
  border: 1px solid rgba(var(--ink), 0.13);
  background: rgba(var(--ink), 0.045);
  color: var(--text);
  font-family: inherit;
  font-size: 0.98rem;
  letter-spacing: -0.01em;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.co-field textarea { resize: vertical; min-height: 62px; line-height: 1.5; }
.co-field input::placeholder,
.co-field textarea::placeholder { color: rgba(var(--ink), 0.3); }
.co-field input:focus,
.co-field select:focus,
.co-field textarea:focus {
  outline: none;
  border-color: rgba(111, 151, 174, 0.85);
  background: rgba(var(--ink), 0.06);
  box-shadow: 0 0 0 3px rgba(111, 151, 174, 0.18);
}
/* native select arrow, drawn to match the dark theme */
.co-field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-opacity='.55' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 16px;
  padding-right: 38px;
  cursor: pointer;
}
.co-field select option { background: #12162a; color: var(--text); }

/* invalid state — only after a submit attempt */
.co-form-touched .co-field input:invalid,
.co-form-touched .co-field textarea:invalid {
  border-color: rgba(234, 120, 120, 0.75);
}

/* ---------- TOTALS ---------- */
.co-totals {
  padding: 16px 0 4px;
  margin-bottom: 20px;
  border-top: 1px solid rgba(var(--ink), 0.09);
}
.co-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding: 7px 0;
  color: rgba(var(--ink), 0.66);
  font-size: 0.95rem;
}
.co-free { color: var(--teal); }
.co-row-total {
  margin-top: 6px;
  padding-top: 14px;
  border-top: 1px solid rgba(var(--ink), 0.09);
  color: var(--text);
  font-size: 1.15rem;
  font-weight: 500;
}
.co-row-total span:last-child { font-size: 1.35rem; font-variant-numeric: tabular-nums; }

.co-submit { width: 100%; height: 46px; font-size: 15px; }

.co-secure {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin-top: 16px;
  color: rgba(var(--ink), 0.5);
  font-size: 0.82rem;
  line-height: 1.45;
}
.co-secure-icon { flex: none; width: 15px; height: 15px; margin-top: 1px; color: var(--teal); }
.co-secure-icon svg {
  width: 100%; height: 100%;
  fill: none; stroke: currentColor;
  stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- STEP 2: PAYMENT ---------- */
.co-back {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 16px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--gray);
  font-family: inherit;
  font-size: 0.88rem;
  cursor: pointer;
  transition: color 0.25s var(--ease);
}
.co-back svg {
  width: 13px; height: 13px;
  fill: none; stroke: currentColor;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
  transition: transform 0.25s var(--ease);
}
.co-back:hover { color: var(--text); }
.co-back:hover svg { transform: translateX(-3px); }

.co-paysummary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 15px 18px;
  margin-bottom: 22px;
  border-radius: 14px;
  background: rgba(111, 151, 174, 0.1);
  box-shadow: inset 0 0 0 1px rgba(111, 151, 174, 0.28);
}
.co-paysummary-line { font-size: 1rem; font-weight: 500; line-height: 1.25; }
.co-paysummary-sub { color: var(--gray); font-size: 0.82rem; margin-top: 3px; }
.co-paysummary-total {
  font-size: 1.3rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* Stripe injects its own iframe here — just give it room */
.co-payment-element { min-height: 80px; margin-bottom: 20px; }

/* ---------- APPLE PAY / GOOGLE PAY ---------- */
.co-express { margin-bottom: 4px; }
#coExpressElement { min-height: 46px; }
.co-or {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 20px 0;
  color: rgba(var(--ink), 0.42);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}
.co-or::before,
.co-or::after {
  content: "";
  flex: 1 1 auto;
  height: 1px;
  background: rgba(var(--ink), 0.11);
}

/* ---------- BUTTON BUSY STATE ---------- */
.co-submit { position: relative; }
.co-submit .co-btn-label { transition: opacity 0.2s var(--ease); }
.co-submit.is-busy .co-btn-label { opacity: 0; }
.co-submit:disabled { cursor: default; }
.co-spinner {
  position: absolute;
  top: 50%; left: 50%;
  width: 17px; height: 17px;
  margin: -8.5px 0 0 -8.5px;
  border-radius: 50%;
  border: 2px solid rgba(22, 22, 29, 0.25);
  border-top-color: var(--btn-ink);
  opacity: 0;
  animation: co-spin 0.7s linear infinite;
}
.co-submit.is-busy .co-spinner { opacity: 1; }
@keyframes co-spin { to { transform: rotate(360deg); } }

/* ---------- ERRORS ---------- */
.co-error {
  margin-top: 14px;
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(234, 120, 120, 0.1);
  box-shadow: inset 0 0 0 1px rgba(234, 120, 120, 0.35);
  color: #f0b4b4;
  font-size: 0.88rem;
  line-height: 1.45;
}

/* ---------- CONFIRMATION VIEW ---------- */
.co-done { text-align: center; padding: 14px 0 6px; }
.co-done-mark {
  display: grid; place-items: center;
  width: 60px; height: 60px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: rgba(111, 151, 174, 0.16);
  box-shadow: inset 0 0 0 1px rgba(111, 151, 174, 0.5);
  color: var(--teal);
}
.co-done-mark svg {
  width: 26px; height: 26px;
  fill: none; stroke: currentColor;
  stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round;
}
.co-done-copy {
  color: rgba(var(--ink), 0.68);
  font-size: 1rem;
  line-height: 1.6;
  max-width: 380px;
  margin: 14px auto 26px;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 480px) {
  .co-grid { grid-template-columns: 1fr; }
  .co-summary { flex-wrap: wrap; }
  .co-qty { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .co-modal, .co-card { transition: none; }
}

/* ================================================================
   ONE-STEP CHECKOUT
   ================================================================ */
.co-title-sm {
  font-size: 1.25rem;
  letter-spacing: -0.015em;
  margin: 0 0 18px;
  padding-right: 44px;
}
#coCheckView .co-summary { margin-bottom: 18px; }
.co-price {
  flex: none;
  min-width: 52px;
  text-align: right;
  font-size: 1.1rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

/* wallet buttons */
.co-express { margin-bottom: 12px; }
.co-express[hidden] { display: none; }
#coExpressElement { min-height: 48px; }

/* "Pay with card" — quiet secondary button under the wallet */
.co-cardtoggle {
  width: 100%;
  height: 48px;
  border-radius: 11px;
  border: 1px solid rgba(var(--ink), 0.16);
  background: transparent;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  cursor: pointer;
  transition: background 0.25s var(--ease), border-color 0.25s var(--ease);
}
.co-cardtoggle:hover { background: rgba(var(--ink), 0.06); border-color: rgba(var(--ink), 0.28); }

.co-cardform { margin-top: 4px; animation: co-reveal 0.35s var(--ease); }
.co-stripe-el { margin-bottom: 14px; }
.co-stripe-el:empty { min-height: 44px; }
.co-cardform .co-submit { margin-top: 6px; }
@keyframes co-reveal { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

#coCheckView .co-secure { justify-content: center; align-items: center; margin-top: 18px; }
#coCheckView .co-secure-icon { margin-top: 0; }

@media (max-width: 480px) {
  #coCheckView .co-summary { flex-wrap: nowrap; gap: 10px; }
  #coCheckView .co-thumb { width: 50px; height: 50px; }
  #coCheckView .co-product-sub { font-size: 0.8rem; }
}
@media (prefers-reduced-motion: reduce) { .co-cardform { animation: none; } }

/* ---------- DELIVERY ADDRESS (postcode first) ---------- */
.co-addr { display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.co-addr-row { display: grid; grid-template-columns: 1fr 1.25fr; gap: 12px; }
.co-addr .co-label { font-size: 13px; color: rgba(255, 255, 255, 0.62); }
.co-field-pc input { text-transform: uppercase; letter-spacing: 0.02em; }
.co-field-pc input::placeholder { text-transform: none; }
.co-addr .co-field input.is-invalid { border-color: rgba(234, 120, 120, 0.75); }
.co-pc-status {
  margin: -4px 0 0;
  font-size: 0.82rem;
  line-height: 1.4;
  color: rgba(var(--ink), 0.6);
}
.co-pc-status.is-ok  { color: var(--teal); }
.co-pc-status.is-bad { color: #f0b4b4; }
@media (max-width: 330px) { .co-addr-row { grid-template-columns: 1fr; } }

/* ---------- PHONE: product row stacks so nothing overlaps ----------
   [img]  LightPod
          Free delivery
          [− 1 +]          £199                                    */
@media (max-width: 560px) {
  #coCheckView .co-summary {
    display: grid;
    grid-template-columns: 64px auto 1fr;
    grid-template-areas:
      "thumb copy  copy"
      "thumb qty   price";
    align-items: center;
    column-gap: 14px;
    row-gap: 10px;
    padding: 14px;
  }
  #coCheckView .co-thumb { grid-area: thumb; width: 64px; height: 64px; align-self: stretch; height: auto; min-height: 64px; }
  #coCheckView .co-summary-copy { grid-area: copy; }
  #coCheckView .co-product-sub { white-space: nowrap; font-size: 0.85rem; }
  #coCheckView .co-qty { grid-area: qty; margin-left: 0; justify-self: start; }
  #coCheckView .co-price { grid-area: price; justify-self: end; font-size: 1.15rem; }
}
@media (max-width: 560px) {
  .co-addr-row { grid-template-columns: 1fr 1.55fr; gap: 10px; }
  .co-field-country select { padding-left: 12px; padding-right: 30px; background-position: right 9px center; font-size: 0.95rem; }
}

/* ---------- OPEN / CLOSE ANIMATION ----------
   The blur itself animates (0 → 14px) instead of fading the whole overlay —
   browsers can't paint a backdrop blur on a layer mid-fade, which made the
   blur "pop" in after the card. The card follows a beat later with a short
   fade + lift. Closing runs the same thing in reverse, a little quicker. */
.co-modal {
  opacity: 1;
  visibility: hidden;
  transition: visibility 0s linear 0.42s;          /* stay visible until the close animation ends */
}
.co-modal.open { visibility: visible; transition-delay: 0s; }

.co-backdrop {
  background: rgba(3, 4, 10, 0);
  -webkit-backdrop-filter: blur(0px);
          backdrop-filter: blur(0px);
  transition:
    background 0.42s cubic-bezier(0.4, 0, 0.2, 1),
    -webkit-backdrop-filter 0.42s cubic-bezier(0.4, 0, 0.2, 1),
    backdrop-filter 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}
.co-modal.open .co-backdrop {
  background: rgba(3, 4, 10, 0.62);
  -webkit-backdrop-filter: blur(14px);
          backdrop-filter: blur(14px);
}

.co-card {
  opacity: 0;
  transform: translateY(12px) scale(0.985);
  transition: opacity 0.28s ease, transform 0.32s var(--ease);
}
.co-modal.open .co-card {
  opacity: 1;
  transform: none;
  transition: opacity 0.4s ease 0.08s, transform 0.5s var(--ease) 0.08s;
}

@media (prefers-reduced-motion: reduce) {
  .co-backdrop, .co-card, .co-modal.open .co-card { transition: opacity 0.2s ease; }
  .co-card { transform: none; }
}

/* ---------- TITLE: centred, no close button ---------- */
.co-title-sm { text-align: center; padding-right: 0; }
.co-card:focus { outline: none; }

/* ---------- LOADING PLACEHOLDERS ----------
   Two soft bars the exact size of the Apple Pay and "Pay with card" buttons,
   so nothing jumps when the real buttons arrive. */
.co-skeleton { display: flex; flex-direction: column; gap: 12px; }
.co-skeleton[hidden] { display: none; }
.co-skel {
  display: block;
  height: 48px;
  border-radius: 11px;
  background:
    linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.07) 50%, transparent 80%)
      -150% 0 / 60% 100% no-repeat,
    rgba(var(--ink), 0.06);
  animation: co-shimmer 1.4s ease-in-out infinite;
}
.co-skel-outline {
  background-color: transparent;
  box-shadow: inset 0 0 0 1px rgba(var(--ink), 0.12);
}
@keyframes co-shimmer { to { background-position: 250% 0, 0 0; } }

/* wallet box stays in the layout (so Stripe can measure it) but invisible until ready */
.co-express.is-pending { height: 0; margin: 0; overflow: hidden; opacity: 0; }
.co-express:not(.is-pending), .co-cardtoggle { animation: co-fadein 0.3s ease; }
@keyframes co-fadein { from { opacity: 0; } to { opacity: 1; } }

/* Stripe fields shimmer until their iframe is ready */
.co-stripe-el { position: relative; }
.co-stripe-el.is-loading { min-height: 66px; }
.co-stripe-el.is-loading::before {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 44px;
  border-radius: 11px;
  background:
    linear-gradient(100deg, transparent 20%, rgba(255, 255, 255, 0.07) 50%, transparent 80%)
      -150% 0 / 60% 100% no-repeat,
    rgba(var(--ink), 0.05);
  animation: co-shimmer 1.4s ease-in-out infinite;
}
#coPaymentElement.is-loading { min-height: 140px; }
#coPaymentElement.is-loading::before { height: 120px; }

@media (prefers-reduced-motion: reduce) {
  .co-skel, .co-stripe-el.is-loading::before { animation: none; }
}

/* ---------- PHONE PRODUCT ROW (v2) ----------
   [ image ]  LightPod          £199
              Free delivery    − 1 +
   Image left, name centred against it, price + a light pill stepper on the right. */
@media (max-width: 560px) {
  #coCheckView .co-summary {
    display: grid;
    grid-template-columns: 68px 1fr auto;
    grid-template-rows: auto auto;
    grid-template-areas:
      "thumb copy price"
      "thumb copy qty";
    align-items: center;
    column-gap: 14px;
    row-gap: 8px;
    padding: 12px 14px 12px 12px;
    border-radius: 18px;
  }
  #coCheckView .co-thumb {
    grid-area: thumb;
    width: 68px; height: 68px; min-height: 0;
    align-self: center;
    border-radius: 13px;
  }
  #coCheckView .co-thumb img { object-fit: contain; padding: 4px 0; }
  #coCheckView .co-summary-copy { grid-area: copy; align-self: center; }
  #coCheckView .co-product { font-size: 1.05rem; }
  #coCheckView .co-product-sub { font-size: 0.82rem; margin-top: 4px; white-space: nowrap; }
  #coCheckView .co-price {
    grid-area: price;
    align-self: end;
    justify-self: end;
    font-size: 1.08rem;
    line-height: 1;
  }
  #coCheckView .co-qty {
    grid-area: qty;
    align-self: start;
    justify-self: end;
    margin: 0;
    padding: 2px;
    gap: 0;
    border-radius: 99px;
    background: transparent;
    box-shadow: inset 0 0 0 1px rgba(var(--ink), 0.14);
  }
  #coCheckView .co-qty-btn { width: 26px; height: 26px; border-radius: 99px; font-size: 0.95rem; }
  #coCheckView .co-qty-val { min-width: 18px; font-size: 0.9rem; }
}

/* ---------- TOTAL ROW (price moved out of the product box) ----------
   [ image ]  LightPod          ( − 1 + )
              Free delivery
   Total                              £199
   [ Apple Pay ]                                                     */
#coCheckView .co-summary { margin-bottom: 0; }
.co-total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 16px 4px 18px;
}
.co-total-label { color: rgba(var(--ink), 0.62); font-size: 0.95rem; }
.co-total .co-price {
  min-width: 0;
  font-size: 1.35rem;
  font-weight: 500;
  font-variant-numeric: tabular-nums;
}

@media (max-width: 560px) {
  #coCheckView .co-summary {
    grid-template-columns: 68px 1fr auto;
    grid-template-rows: auto;
    grid-template-areas: "thumb copy qty";
  }
  #coCheckView .co-qty { align-self: center; }
  .co-total .co-price { font-size: 1.3rem; }
}

/* ---------- LABELS INSIDE THE BOXES ----------
   Our address fields use placeholders; Stripe's email + card fields use
   floating labels (set in script.js). Labels stay for screen readers. */
.co-addr .co-label {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}
.co-addr .co-field { gap: 0; }
.co-addr { gap: 12px; }
.co-addr .co-field input::placeholder { color: rgba(255, 255, 255, 0.45); opacity: 1; }
.co-field-pc input::placeholder { text-transform: none; letter-spacing: normal; }
/* same height as Stripe's email + card boxes so the whole form lines up */
.co-addr .co-field input,
.co-addr .co-field select { height: 60px; padding-top: 0; padding-bottom: 0; padding-left: 14px; }

/* no visible scrollbar on the checkout card — it still scrolls */
.co-card { scrollbar-width: none; -ms-overflow-style: none; }
.co-card::-webkit-scrollbar { display: none; width: 0; height: 0; }

/* ================================================================
   MOBILE POLISH (audit fixes)
   ================================================================ */
/* Pay button stays pinned to the bottom of the popup while the form scrolls */
.co-paybar {
  position: sticky;
  bottom: calc(-1 * clamp(28px, 3.4vw, 40px));     /* reach the popup's bottom edge, past its padding */
  z-index: 3;
  margin: 6px calc(-1 * clamp(28px, 3.4vw, 40px)) 0;
  padding: 22px clamp(28px, 3.4vw, 40px) 20px;
  background: linear-gradient(180deg, rgba(11, 14, 26, 0) 0, #0b0e1a 20px);
}
.co-paybar .co-submit { margin-top: 0; }

@media (max-width: 640px) {
  /* 16px text: anything smaller makes iPhone Safari zoom into the field */
  .co-addr .co-field input,
  .co-addr .co-field select,
  .co-field-country select { font-size: 16px; }
}
.co-addr .co-field input::placeholder { color: rgba(255, 255, 255, 0.5); }
