:root {
  --bg: #edf2f8;
  --panel: #ffffff;
  --panel-soft: #f5f8fc;
  --line: #d8e1ed;
  --line-strong: #c4d0e0;
  --text: #172235;
  --muted: #68768b;
  --placeholder: #97a3b5;
  --blue: #145fd0;
  --blue-dark: #0f4fb2;
  --blue-soft: rgba(20, 95, 208, 0.1);
  --shadow: 0 34px 90px rgba(17, 31, 56, 0.14);
  --field-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
  --focus: 0 0 0 4px rgba(20, 95, 208, 0.12);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: "Manrope", sans-serif;
  color: var(--text);
  overflow-x: hidden;
  background:
    radial-gradient(circle at top left, rgba(65, 116, 214, 0.2), transparent 24%),
    radial-gradient(circle at bottom right, rgba(120, 160, 225, 0.14), transparent 28%),
    linear-gradient(180deg, #f8fbff 0%, var(--bg) 100%);
}

body.has-modal {
  overflow: hidden;
  position: fixed;
  inset: 0;
  width: 100%;
}

.is-loading {
  overflow: hidden;
}

.is-loading .page-shell {
  opacity: 0;
  visibility: hidden;
}

.page-loader {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: 6.5rem 1.75rem 1.5rem;
  background: #ffffff;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
}

.page-loader.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.loader-center,
.loader-bottom {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.loader-center {
  flex: 1 1 auto;
  justify-content: center;
  gap: 1.2rem;
  padding-bottom: 6vh;
}

.loader-bottom {
  gap: 1.15rem;
}

.loader-pill,
.loader-card {
  display: block;
  position: relative;
  overflow: hidden;
  border-radius: 999px;
  background: #eef1f5;
}

.loader-pill::after,
.loader-card::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.68) 48%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: loader-shimmer 1.3s linear infinite;
}

.loader-pill-small {
  width: min(44vw, 174px);
  height: 2rem;
}

.loader-pill-medium {
  width: min(58vw, 252px);
  height: 3.6rem;
}

.loader-card-large {
  width: min(100%, 680px);
  height: clamp(6.8rem, 16vw, 8.8rem);
  border-radius: 18px;
}

.loader-card-small {
  width: min(76vw, 500px);
  height: 2.5rem;
}

@keyframes loader-shimmer {
  to {
    transform: translateX(100%);
  }
}

a {
  color: inherit;
  text-decoration: none;
}

.page-shell {
  min-height: 100vh;
  padding: 2.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;
}

.gateway-modal {
  position: fixed;
  inset: 0;
  z-index: 45;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
}

.gateway-modal.is-open {
  display: flex;
  opacity: 1;
  animation: gateway-fade-in 0.22s ease-out;
}

.gateway-window {
  position: relative;
  z-index: 1;
  width: 425px;
  height: 625px;
}

.gateway-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(6px);
}

.gateway-dialog {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: #ffffff;
  border: 1px solid rgba(226, 232, 240, 0.9);
  box-shadow:
    0 20px 48px rgba(15, 23, 42, 0.18),
    0 4px 16px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  transform: translateY(0);
  animation: gateway-dialog-rise 0.24s ease-out;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.gateway-top-close {
  position: absolute;
  z-index: 2;
  top: 0;
  right: 0;
  transform: translateY(calc(-100% - 0.4rem));
  border: 0;
  background: transparent;
  color: #ffffff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  cursor: pointer;
  opacity: 0.92;
}

.gateway-dialog-body {
  flex: 1 1 auto;
  min-height: 0;
  background: #ffffff;
}

.gateway-frame-shell {
  position: relative;
  width: 100%;
  height: 100%;
  background: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
}

.gateway-loader-wrap {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  opacity: 1;
  visibility: visible;
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease;
}

.gateway-loader-wrap.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.gateway-loader-wrap.is-instant,
.gateway-challenge.is-instant {
  transition: none;
}

.gateway-loader-wrap.is-processing .visa-logo {
  opacity: 0;
  visibility: hidden;
}

.gateway-challenge {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  background: #ffffff;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease;
}

.gateway-challenge.is-visible {
  opacity: 1;
  visibility: visible;
}

.gateway-challenge-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  padding: 0.9rem 1rem 0.8rem;
  border-bottom: 1px solid #a8a8a8;
}

.gateway-cibc-mark {
  display: none;
  align-items: center;
  gap: 0.35rem;
  color: #c9254c;
}

.gateway-cibc-word {
  font-size: 2rem;
  line-height: 1;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.gateway-cibc-icon {
  width: 26px;
  height: 26px;
  position: relative;
  display: inline-block;
  background: #c9254c;
  transform: rotate(45deg);
  border-radius: 3px;
}

.gateway-cibc-icon::before {
  content: "";
  position: absolute;
  inset: 5px;
  background: #ffffff;
}

.gateway-challenge-visa {
  width: 142.8px;
  height: auto;
  display: block;
}

.gateway-challenge-body {
  flex: 1 1 auto;
  overflow-y: auto;
  padding: 4.2rem 0.95rem 1.4rem;
  color: #000000;
}

.gateway-challenge-title {
  margin: 0 0 1.25rem;
  font-size: 1rem;
  line-height: 1.2;
  font-weight: 800;
}

.gateway-challenge-copy {
  margin: 0 0 2rem;
  color: #111111;
  font-size: 0.92rem;
  line-height: 1.55;
}

.gateway-code-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  width: min(100%, 270px);
  margin: 3rem auto 0;
}

.gateway-code-label {
  color: #7775a8;
  font-size: 0.82rem;
  font-weight: 500;
  text-align: center;
}

.gateway-code-label.is-error {
  color: #d12d3f;
}

.gateway-code-input {
  min-height: 42px;
  border: 1px solid #8888ba;
  border-radius: 4px;
  background: #ffffff;
  color: #111111;
  font: inherit;
  padding: 0 0.75rem;
}

.gateway-code-field.has-error .gateway-code-input {
  border-color: #d12d3f;
}

.gateway-confirm-button {
  display: block;
  width: min(100%, 270px);
  min-height: 42px;
  margin: 0.45rem auto 0;
  border: 0;
  border-radius: 4px;
  background: #2944b4;
  color: #ffffff;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
}

.gateway-confirm-button:disabled,
.gateway-link-button:disabled,
.gateway-code-input:disabled {
  cursor: not-allowed;
}

.gateway-confirm-button:disabled {
  opacity: 0.8;
}

.gateway-link-button:disabled,
.gateway-code-input:disabled {
  opacity: 0.65;
}

.gateway-link-button,
.gateway-help-link {
  border: 0;
  background: transparent;
  color: #2944b4;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.gateway-link-button {
  display: block;
  margin: 2.4rem auto 0;
  font-size: 0.76rem;
}

.gateway-help-link {
  display: block;
  margin-top: 2.8rem;
  padding: 0;
  font-size: 0.84rem;
}

.gateway-soft-spinner-wrap {
  position: absolute;
  top: calc(50% - 82px);
  left: 50%;
  transform: translate(-50%, -50%);
  width: 52px;
  height: 52px;
}

.gateway-loader-wrap.is-processing .gateway-soft-spinner-wrap {
  top: calc(50% - 28px);
}

.gateway-soft-spinner {
  display: block;
  width: 52px;
  height: 52px;
  border: 4px solid rgba(37, 99, 235, 0.06);
  border-top-color: rgba(37, 99, 235, 0.16);
  border-right-color: rgba(37, 99, 235, 0.1);
  border-radius: 50%;
  animation: gateway-soft-spin 1.15s linear infinite;
}

.visa-logo {
  width: min(203.125px, 57.6vw);
  height: auto;
  display: block;
  margin-inline: auto;
}

.gateway-processing-label {
  position: absolute;
  top: calc(50% + 22px);
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
  color: #111111;
  font-size: 0.9rem;
  font-weight: 700;
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.18s ease,
    visibility 0.18s ease;
}

.gateway-loader-wrap.is-processing .gateway-processing-label {
  opacity: 1;
  visibility: visible;
}

@keyframes gateway-fade-in {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes gateway-dialog-rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes gateway-soft-spin {
  to {
    transform: rotate(360deg);
  }
}

.checkout-page {
  width: min(1180px, 100%);
  min-height: 780px;
  display: grid;
  grid-template-columns: minmax(340px, 0.94fr) minmax(420px, 1.06fr);
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.summary-panel {
  padding: 3.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background:
    radial-gradient(circle at top left, rgba(20, 95, 208, 0.18), transparent 32%),
    linear-gradient(180deg, #f8fbff 0%, #eef4fb 54%, #e9f0fa 100%);
}

.summary-top {
  display: flex;
  flex-direction: column;
  gap: 1.85rem;
}

.summary-badge {
  width: fit-content;
  min-height: 36px;
  padding: 0 1rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--blue-soft);
  color: var(--blue-dark);
  border: 1px solid rgba(20, 95, 208, 0.14);
  font-size: 0.79rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

.summary-copy p {
  margin: 0 0 0.6rem;
  color: #5f6f85;
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.summary-copy h1 {
  margin: 0;
  font-size: clamp(3rem, 4.6vw, 4.15rem);
  line-height: 0.94;
  letter-spacing: -0.07em;
  font-weight: 800;
}

.price-lockup {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 0.3rem;
}

.price-display,
.summary-total-price {
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 0.08em;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.price-prefix {
  font-size: 0.34em;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.03em;
  padding-top: 0.34em;
  opacity: 0.9;
}

.price-main {
  font-size: 1em;
  line-height: 0.88;
  letter-spacing: -0.075em;
}

.price-note {
  color: #738198;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.summary-caption {
  display: block;
  margin-top: 1rem;
  max-width: 25rem;
  color: var(--muted);
  font-size: 0.97rem;
  line-height: 1.72;
}

.summary-card {
  margin-top: 1rem;
  padding: 1.25rem 1.35rem;
  border-radius: 24px;
  border: 1px solid rgba(20, 95, 208, 0.08);
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    0 16px 36px rgba(29, 52, 90, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

.summary-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem 0;
  color: #6d7788;
  font-size: 0.93rem;
}

.summary-line + .summary-line {
  border-top: 1px solid rgba(214, 223, 236, 0.95);
}

.summary-line strong {
  color: var(--text);
  font-size: 1rem;
}

.summary-line.total strong {
  color: var(--blue-dark);
  font-size: 1.12rem;
  margin-left: auto;
  text-align: right;
}

.summary-total-price .price-main {
  font-size: 1em;
  line-height: 0.9;
}

.summary-total-price .price-prefix {
  font-size: 0.46em;
  padding-top: 0.28em;
}

.summary-footer {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: #778295;
  font-size: 0.8rem;
  font-weight: 600;
}

.summary-footer strong {
  color: #5f6876;
  font-weight: 800;
}

.summary-footer a {
  transition: color 0.18s ease;
}

.summary-footer a:hover {
  color: var(--text);
}

.footer-divider {
  width: 1px;
  height: 22px;
  background: rgba(164, 177, 196, 0.45);
}

.summary-footer-mobile {
  display: none;
}

.payment-panel {
  padding: 3.2rem;
  border-left: 1px solid rgba(224, 231, 241, 0.9);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98) 0%, #fbfcff 100%);
}

.payment-shell {
  width: min(100%, 500px);
  margin: 0 auto;
}

.payment-header {
  margin-bottom: 2rem;
}

.payment-shell h2 {
  margin: 0 0 0.5rem;
  font-size: 2.1rem;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.payment-header p {
  margin: 0;
  color: #172235;
  font-size: 1.32rem;
  line-height: 1.35;
  font-weight: 800;
}

.payment-form {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.field-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: #475467;
  letter-spacing: -0.01em;
}

.input,
.select-field,
.card-stack {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #fbfcfe 100%);
  box-shadow:
    var(--field-shadow),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
  transition:
    border-color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.input,
.select-field,
.card-row {
  min-height: 58px;
}

.input {
  padding: 0 18px;
  display: flex;
  align-items: center;
}

.like-combined {
  gap: 0.95rem;
}

.input-label {
  font-size: 0.82rem;
  font-weight: 800;
  color: #475467;
  flex: 0 0 auto;
}

.placeholder {
  color: var(--placeholder);
}

.text-input {
  width: 100%;
  min-width: 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  font-weight: 600;
  padding: 0;
}

.text-input::placeholder {
  color: var(--placeholder);
  font-weight: 500;
}

.email-input {
  flex: 1 1 auto;
  font-weight: 500;
}

.cardholder-input {
  font-weight: 500;
}

.email-input::placeholder {
  color: #7d8592;
  font-weight: 500;
}

.cardholder-input::placeholder {
  color: #7d8592;
  font-size: 0.96rem;
  font-weight: 500;
}

.input:focus-within,
.card-stack:focus-within,
.select-wrap:focus-within {
  border-color: rgba(20, 95, 208, 0.55);
  box-shadow:
    var(--focus),
    0 10px 24px rgba(20, 95, 208, 0.08);
  transform: translateY(-1px);
}

.card-stack {
  overflow: hidden;
}

.card-stack.has-error {
  border-color: #ef4444;
  box-shadow:
    0 0 0 4px rgba(239, 68, 68, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.65);
}

.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0;
  padding: 0 18px;
}

.card-number-row.has-error .card-brands {
  display: none;
}

.card-row + .card-row {
  border-top: 1px solid var(--line);
}

.card-row.split {
  padding-right: 14px;
}

.card-input,
.expiry-input {
  flex: 1 1 auto;
}

.card-input[aria-invalid="true"] {
  color: #ef4444;
  caret-color: #ef4444;
}

.cvc-input {
  flex: 1 1 auto;
  min-height: 58px;
  padding-left: 18px;
}

.cvc-input[aria-invalid="true"] {
  color: #ef4444;
  caret-color: #ef4444;
}

.cvc-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 35%;
  min-height: 58px;
  padding-left: 18px;
  border-left: 1px solid var(--line);
  border-radius: 0 0 16px 0;
  position: relative;
  z-index: 1;
}

.card-row.split.has-cvc-error .cvc-wrap {
  border-left-color: var(--line);
}

.card-brands {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: 0.9rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 22px;
  border-radius: 6px;
  font-size: 0.55rem;
  font-weight: 800;
  line-height: 1;
}

.brand.visa {
  width: 33px;
  background: #ffffff;
  color: #1546b0;
  border: 1px solid #d9dce3;
}

.brand.mastercard {
  width: 31px;
  background:
    radial-gradient(circle at 40% 50%, #ea4a2f 0 34%, transparent 35%),
    radial-gradient(circle at 60% 50%, #f0b529 0 34%, transparent 35%),
    #23252a;
}

.brand.amex {
  width: 26px;
  background: #2486e2;
  color: #ffffff;
  font-size: 0.44rem;
}

.brand.is-hidden {
  display: none;
}

.card-alert-icon {
  display: none;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 2px solid #ef4444;
  border-radius: 999px;
  color: #ef4444;
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}

.card-number-row.has-error .card-alert-icon {
  display: inline-flex;
}

.card-icon {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  background:
    radial-gradient(circle at 70% 28%, #757575 0 20%, transparent 21%),
    linear-gradient(180deg, #f7f7f8 0%, #d9d9dc 100%);
  border: 1px solid #d1d3d8;
  flex: 0 0 auto;
}

.card-row.split.has-cvc-error .card-icon {
  display: none;
}

.cvc-alert-icon {
  display: none;
}

.card-row.split.has-cvc-error .cvc-alert-icon {
  display: inline-flex;
}

.select-field {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px;
  font-size: 0.92rem;
  color: #40434a;
  font-weight: 600;
}

.select-wrap {
  position: relative;
  padding: 0;
}

.select-input {
  width: 100%;
  min-height: 58px;
  border: 0;
  outline: 0;
  background: transparent;
  color: #40434a;
  font: inherit;
  font-size: 1rem;
  font-weight: 700;
  padding: 0 56px 0 18px;
  appearance: none;
  cursor: pointer;
}

.chevron {
  position: absolute;
  top: 50%;
  right: 18px;
  color: #8e98a9;
  font-size: 1.5rem;
  line-height: 1;
  transform: translateY(-50%);
  pointer-events: none;
}

.pay-button {
  min-height: 60px;
  border: 0;
  border-radius: 18px;
  position: relative;
  background:
    linear-gradient(180deg, #1a72dc 0%, #135fca 100%);
  color: #ffffff;
  font: inherit;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  box-shadow:
    0 18px 34px rgba(20, 95, 208, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
  cursor: pointer;
  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    filter 0.18s ease;
}

.pay-button .currency-suffix {
  font-size: 0.76em;
  margin-left: 0.03em;
  transform: translateY(0.03em);
}

.pay-button:hover {
  transform: translateY(-1px);
  filter: brightness(1.02);
  box-shadow:
    0 22px 38px rgba(20, 95, 208, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.pay-button:active {
  transform: translateY(0);
}

.pay-button:disabled,
.pay-button.is-processing {
  cursor: pointer;
  filter: saturate(0.9);
  opacity: 0.9;
}

.pay-button.is-processing {
  padding-right: 3.4rem;
}

.pay-button.is-processing::after {
  content: "";
  position: absolute;
  top: 50%;
  right: 1.15rem;
  width: 20px;
  height: 20px;
  margin-top: -10px;
  border: 3px solid rgba(255, 255, 255, 0.35);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: pay-button-spin 0.75s linear infinite;
}

@keyframes pay-button-spin {
  to {
    transform: rotate(360deg);
  }
}

.payment-note {
  margin: -0.2rem 0 0;
  color: #7a8798;
  font-size: 0.84rem;
  line-height: 1.6;
  text-align: center;
}

.expiry-error {
  margin: 0.25rem 0 0;
  color: #ef4444;
  font-size: 0.82rem;
  line-height: 1.45;
  font-weight: 600;
}

.card-error {
  margin: 0.25rem 0 0;
  color: #ef4444;
  font-size: 0.82rem;
  line-height: 1.45;
  font-weight: 600;
}

.cvc-error {
  margin: 0.25rem 0 0;
  color: #ef4444;
  font-size: 0.82rem;
  line-height: 1.45;
  font-weight: 600;
}

@media (max-width: 980px) {
  .page-loader {
    padding: 5.25rem 1.25rem 1.25rem;
  }

  .loader-center {
    padding-bottom: 8vh;
  }

  .page-shell {
    padding: 1.1rem;
    align-items: flex-start;
  }

  .checkout-page {
    min-height: auto;
    grid-template-columns: 1fr;
  }

  .summary-panel,
  .payment-panel {
    padding: 2rem 1.4rem;
  }

  .payment-panel {
    border-left: 0;
    border-top: 1px solid rgba(224, 231, 241, 0.9);
  }

  .summary-top {
    gap: 1.5rem;
  }

  .summary-card {
    margin-top: 0;
  }

  .summary-footer {
    margin-top: 2rem;
    flex-wrap: wrap;
    row-gap: 0.65rem;
  }
}

@media (max-width: 560px) {
  .page-loader {
    padding:
      calc(2rem + env(safe-area-inset-top))
      calc(1.15rem + env(safe-area-inset-right))
      calc(1rem + env(safe-area-inset-bottom))
      calc(1.15rem + env(safe-area-inset-left));
  }

  .loader-center {
    gap: 1rem;
    padding-bottom: 10vh;
  }

  .loader-pill-small {
    width: min(42vw, 154px);
    height: 2rem;
  }

  .loader-pill-medium {
    width: min(54vw, 214px);
    height: 3.3rem;
  }

  .loader-bottom {
    gap: 1rem;
  }

  .loader-card-large {
    width: 100%;
    height: 6.8rem;
    border-radius: 16px;
  }

  .loader-card-small {
    width: 78%;
    height: 2.35rem;
  }

  .summary-footer-desktop {
    display: none;
  }

  .summary-footer-mobile {
    display: grid;
    grid-template-columns: auto auto auto;
    justify-content: center;
    align-items: center;
    column-gap: 0.75rem;
    row-gap: 0.6rem;
    margin-top: 0.45rem;
    font-size: 0.76rem;
    text-align: center;
  }

  .summary-footer-mobile > span:first-child {
    grid-column: 1;
    grid-row: 1;
  }

  .summary-footer-mobile .footer-divider {
    display: block;
    grid-column: 2;
    grid-row: 1;
    width: 1px;
    height: 14px;
  }

  .summary-footer-mobile a:first-of-type {
    grid-column: 3;
    grid-row: 1;
  }

  .summary-footer-mobile a:last-of-type {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: center;
  }

  .summary-footer-mobile a,
  .summary-footer-mobile span {
    white-space: nowrap;
  }

  .page-shell {
    min-height: auto;
    padding:
      calc(0.8rem + env(safe-area-inset-top))
      calc(0.8rem + env(safe-area-inset-right))
      calc(0.95rem + env(safe-area-inset-bottom))
      calc(0.8rem + env(safe-area-inset-left));
  }

  .checkout-page {
    width: 100%;
    border-radius: 24px;
  }

  .summary-panel,
  .payment-panel {
    padding: 1.2rem 1rem;
  }

  .summary-badge {
    min-height: 32px;
    padding: 0 0.85rem;
    font-size: 0.73rem;
  }

  .summary-copy h1 {
    font-size: clamp(2.25rem, 11vw, 2.8rem);
  }

  .price-display {
    gap: 0.07em;
  }

  .price-lockup {
    gap: 0.22rem;
  }

  .price-note {
    font-size: 0.68rem;
  }

  .summary-card {
    padding: 1.05rem 1rem;
    border-radius: 20px;
  }

  .summary-line {
    padding: 0.8rem 0;
    align-items: flex-start;
    font-size: 0.88rem;
  }

  .summary-line strong {
    font-size: 0.95rem;
  }

  .summary-footer {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.55rem;
  }

  .footer-divider {
    display: none;
  }

  .payment-header {
    margin-bottom: 1.3rem;
  }

  .payment-header p {
    font-size: 1.12rem;
  }

  .payment-shell h2 {
    font-size: 1.7rem;
  }

  .input,
  .select-field,
  .card-row,
  .pay-button {
    min-height: 52px;
  }

  .select-input,
  .cvc-input {
    min-height: 52px;
  }

  .field-group {
    gap: 0.55rem;
  }

  .field-label,
  .input-label {
    font-size: 0.78rem;
  }

  .like-combined {
    flex-wrap: wrap;
    align-content: center;
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
  }

  .card-row {
    gap: 10px;
    padding: 0 14px;
  }

  .card-row.split {
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    padding-right: 14px;
  }

  .expiry-input {
    min-width: 0;
  }

  .cvc-wrap {
    flex: 0 0 44%;
    min-width: 112px;
    gap: 8px;
    padding-left: 12px;
  }

  .cvc-input {
    min-width: 0;
    padding-left: 10px;
    font-size: 0.95rem;
  }

  .card-icon,
  .cvc-alert-icon {
    width: 22px;
    height: 22px;
  }

  .card-brands {
    gap: 5px;
    margin-left: 0.45rem;
  }

  .brand.visa {
    width: 29px;
  }

  .brand.mastercard {
    width: 29px;
  }

  .brand.amex {
    width: 24px;
    font-size: 0.42rem;
  }

  .payment-note {
    text-align: center;
    font-size: 0.82rem;
  }

  .gateway-dialog {
    width: min(100%, 500px);
    height: min(calc(100vh - 2.4rem), 600px);
  }

  .gateway-modal {
    padding: 0;
  }

  .gateway-dialog {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: 0;
  }
}

@media (max-width: 400px) {
  .page-loader {
    padding:
      calc(1.7rem + env(safe-area-inset-top))
      calc(0.9rem + env(safe-area-inset-right))
      calc(0.85rem + env(safe-area-inset-bottom))
      calc(0.9rem + env(safe-area-inset-left));
  }

  .loader-pill-small {
    width: 43vw;
    height: 1.9rem;
  }

  .loader-pill-medium {
    width: 56vw;
    height: 3.15rem;
  }

  .loader-card-large {
    height: 6.3rem;
  }

  .loader-card-small {
    width: 74%;
    height: 2.15rem;
  }

  .page-shell {
    padding:
      calc(0.65rem + env(safe-area-inset-top))
      calc(0.65rem + env(safe-area-inset-right))
      calc(0.8rem + env(safe-area-inset-bottom))
      calc(0.65rem + env(safe-area-inset-left));
  }

  .checkout-page {
    border-radius: 20px;
  }

  .summary-panel,
  .payment-panel {
    padding: 1rem 0.9rem;
  }

  .summary-copy h1 {
    font-size: 2.15rem;
  }

  .card-row {
    padding: 0 12px;
  }

  .card-row.split {
    gap: 8px;
    padding-right: 12px;
  }

  .cvc-wrap {
    flex-basis: 46%;
    min-width: 104px;
    gap: 6px;
    padding-left: 10px;
  }

  .cvc-input {
    padding-left: 8px;
    font-size: 0.92rem;
  }

  .cvc-input::placeholder,
  .expiry-input::placeholder {
    font-size: 0.84rem;
  }

  .summary-footer-mobile {
    column-gap: 0.55rem;
    row-gap: 0.45rem;
    font-size: 0.74rem;
  }

  .summary-footer-mobile .footer-divider {
    display: block;
    height: 12px;
  }

}

@media (max-width: 640px) {
  .gateway-modal {
    justify-content: center;
    padding:
      calc(1rem + env(safe-area-inset-top))
      calc(0.9rem + env(safe-area-inset-right))
      calc(1rem + env(safe-area-inset-bottom))
      calc(0.9rem + env(safe-area-inset-left));
  }

  .gateway-window {
    width: min(100%, 360px);
    height: min(78vh, 540px);
  }

  .gateway-top-close {
    font-size: 0.72rem;
    letter-spacing: 0.02em;
  }

  .gateway-dialog {
    border-radius: 12px;
    border: 1px solid rgba(226, 232, 240, 0.9);
  }

  .gateway-soft-spinner-wrap {
    top: calc(50% - 68px);
    width: 44px;
    height: 44px;
  }

  .gateway-soft-spinner {
    width: 44px;
    height: 44px;
    border-width: 3px;
  }

  .visa-logo {
    width: min(184.375px, 53.125vw);
  }

  .gateway-challenge-head {
    padding-inline: 0.8rem;
  }

  .gateway-cibc-word {
    font-size: 1.7rem;
  }

  .gateway-cibc-icon {
    width: 22px;
    height: 22px;
  }

  .gateway-challenge-visa {
    width: 158px;
  }

  .gateway-challenge-body {
    padding-top: 2.4rem;
  }
}

@media (max-width: 480px) {
  .gateway-window {
    width: 100%;
    height: min(calc(100vh - 1.8rem), 560px);
  }

  .gateway-soft-spinner-wrap {
    top: calc(50% - 60px);
  }

  .visa-logo {
    width: min(162.5px, 50vw);
  }

  .gateway-challenge-head {
    padding: 0.75rem 0.75rem 0.7rem;
  }

  .gateway-cibc-word {
    font-size: 1.5rem;
  }

  .gateway-cibc-icon {
    width: 19px;
    height: 19px;
  }

  .gateway-challenge-visa {
    width: 145px;
  }

  .gateway-challenge-body {
    padding: 1.35rem 0.8rem 0.95rem;
  }

  .gateway-challenge-copy {
    margin-bottom: 1.2rem;
    font-size: 0.86rem;
  }

  .gateway-code-field,
  .gateway-confirm-button {
    width: 100%;
  }

  .gateway-code-field {
    margin-top: 2rem;
  }

  .gateway-link-button {
    margin-top: 1.45rem;
  }

  .gateway-help-link {
    margin-top: 1.25rem;
  }
}
