/* Shared by the checkout page and the page buyers return to after paying. */
:root { --bg-dark: #020617; --danger: #fca5a5; --success: #86efac; }

.checkout { padding-block: 40px 64px; }

.checkout-title { font-size: clamp(30px, 6vw, 44px); font-weight: 900; line-height: 1.25; text-align: center; }

.checkout-lead { max-width: 560px; margin: 10px auto 32px; color: var(--text-muted); text-align: center; }

.checkout-grid {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  align-items: start;
  gap: 16px;
}

.checkout-card { padding: 24px; }

.checkout-card:hover { border-color: var(--border-dark); }

.checkout-card h2 { margin-bottom: 18px; font-size: 20px; font-weight: 800; }

.narrow { max-width: 520px; margin-inline: auto; text-align: center; }

.narrow form { text-align: start; }

.narrow p { color: var(--text-muted); }

.narrow .btn-ping-primary,
.narrow .btn-ping-secondary { margin-top: 18px; }

/* Fields */
.field { margin-bottom: 16px; }

.field label { display: block; margin-bottom: 6px; font-weight: 700; }

.field input,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 8px 14px;
  background-color: var(--bg-dark);
  border: 1px solid #334155;
  border-radius: 12px;
  color: var(--text-main);
  font: inherit;
}

.field input:focus-visible,
.field select:focus-visible { border-color: var(--accent-blue); outline-offset: 0; }

.field [aria-invalid="true"] { border-color: var(--danger); }

.field input[dir="ltr"] { text-align: left; }

.field-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }

.field-hint { margin-top: 4px; color: var(--text-muted); font-size: 14px; }

.field-error { margin-top: 4px; color: var(--danger); font-size: 14px; font-weight: 500; }

/* Order summary */
.plan-name { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 4px; font-size: 18px; font-weight: 800; }

.plan-note { margin-bottom: 18px; color: var(--text-muted); font-size: 14px; }

.price-row { display: flex; justify-content: space-between; gap: 16px; padding-block: 10px; border-top: 1px solid var(--border-dark); color: var(--text-muted); }

.price-row bdi { white-space: nowrap; }

.price-total { align-items: center; color: var(--text-main); font-weight: 800; }

.price-total bdi { color: var(--primary-orange); font-size: 24px; font-weight: 900; }

/* Payment */
.pay-actions { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }

.pay-actions button { width: 100%; min-height: 54px; }

.apple-pay {
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #fff;
  border: 0;
  border-radius: 12px;
  color: #000;
  cursor: pointer;
  font: inherit;
  font-size: 18px;
  font-weight: 700;
}

.apple-pay:hover:not(:disabled) { background-color: #e2e8f0; }

.apple-pay:disabled { opacity: 0.5; cursor: default; }

/* Where Safari can draw Apple's own button, use it instead of the text. */
@supports (-webkit-appearance: -apple-pay-button) {
  .apple-pay {
    -webkit-appearance: -apple-pay-button;
    -apple-pay-button-style: white;
    -apple-pay-button-type: plain;
  }

  .apple-pay span { display: none; }
}

.pay-note { margin-top: 10px; color: var(--text-muted); font-size: 14px; text-align: center; }

.trust-line { margin-top: 14px; color: var(--success); font-size: 14px; font-weight: 500; text-align: center; }

.form-message { margin-top: 12px; color: var(--danger); font-weight: 500; text-align: center; }

.test-mode { margin-bottom: 16px; padding: 8px 14px; background: rgba(147, 185, 236, 0.1); border: 1px solid rgba(147, 185, 236, 0.3); border-radius: 12px; color: var(--accent-blue); font-size: 14px; text-align: center; }


.reference { margin-top: 10px; font-size: 14px; overflow-wrap: anywhere; }


@media (max-width: 860px) {
  .checkout-grid { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 420px) {
  .field-pair { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .checkout-card { padding: 18px; }
}

/* Added with the language switch and per-branch pricing */
.nav-spacer { margin-inline-start: auto; }

.nav .nav-login { min-height: 40px; padding: 4px 16px; }

.field-spaced { margin-top: 18px; }

.narrow .btn-full { width: 100%; margin-top: 0; }

.branch-stepper { display: grid; grid-template-columns: 48px minmax(0, 1fr) 48px; gap: 8px; }

.field .branch-stepper input[dir="ltr"] { font-weight: 800; text-align: center; }

.branch-stepper button {
  min-height: 48px;
  background: #1e293b;
  border: 0;
  border-radius: 12px;
  color: var(--text-main);
  cursor: pointer;
  font: inherit;
  font-size: 22px;
  font-weight: 800;
}

/* The prefix stays on the left in both languages, as phone numbers read left to right. */
.phone-group { display: flex; direction: ltr; }

.phone-prefix {
  display: grid;
  place-items: center;
  padding-inline: 14px;
  background: #1e293b;
  border: 1px solid #334155;
  border-inline-end: 0;
  border-radius: 12px 0 0 12px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
}

.field .phone-group input { min-width: 0; border-radius: 0 12px 12px 0; text-align: left; }
