/* ═══════════════════════════════════════════════════════════════
   CHECKOUT PAGE — подтверждение заказа теста
   ═══════════════════════════════════════════════════════════════ */

html.checkout-page-root,
body.checkout-page-body {
  height: auto;
  min-height: 100%;
}

html.checkout-page-root {
  overflow-x: hidden;
  overflow-y: auto;
}

body.checkout-page-body {
  overflow: visible;
}

body.checkout-page-body .locale-switcher {
  position: fixed;
  z-index: 15000;
}

.page--checkout {
  --order-grid-width: 1280px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: auto;
  min-height: 100vh;
  min-height: 100svh;
  overflow: visible;
  padding-bottom: 0;
}

.page--checkout > .page-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  min-height: 100vh;
  min-height: 100svh;
}

@supports (height: 100dvh) {
  .page--checkout,
  .page--checkout > .page-content {
    min-height: 100dvh;
  }
}

.brand-link {
  text-decoration: none;
  color: inherit;
  transition: opacity 0.25s ease;
  cursor: pointer !important;
}

.brand-link:hover {
  opacity: 0.72;
}

/* ═══════════════════════════════════════════════════════════════
   HERO
   ═══════════════════════════════════════════════════════════════ */

.checkout-header {
  position: absolute;
  top: 24px;
  left: 48px;
  z-index: 20;
}

.checkout-hero {
  position: relative;
  z-index: 10;
  display: flex;
  flex: 1 0 auto;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: var(--order-grid-width);
  padding: 112px 48px 48px;
  pointer-events: none;
}

@media (min-width: 901px) {
  .checkout-hero {
    padding: 104px 48px 48px;
  }
}

.checkout-content {
  position: relative;
  isolation: isolate;
  width: 100%;
  min-width: 0;
  pointer-events: auto;
}

.checkout-content::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 22%;
  z-index: -1;
  width: 132%;
  height: 78%;
  transform: translate(-50%, -22%);
  pointer-events: none;
  background: radial-gradient(
    ellipse at center,
    rgba(0, 0, 0, 0.72) 0,
    rgba(0, 0, 0, 0.5) 36%,
    rgba(0, 0, 0, 0.22) 64%,
    transparent 82%
  );
  filter: blur(30px);
}

.checkout-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, 0.86fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: center;
  min-width: 0;
}

.checkout-copy {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  max-width: 640px;
  min-width: 0;
}

.eyebrow {
  display: inline-block;
  align-self: flex-start;
  color: var(--gold);
  letter-spacing: 0.08em;
  text-transform: none;
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 28px;
  padding: 8px 20px;
  border: 1px solid rgba(216, 174, 103, 0.35);
  border-radius: 100px;
  background: rgba(216, 174, 103, 0.06);
  backdrop-filter: blur(4px);
}

@media (min-width: 901px) {
  .eyebrow {
    margin: 0 0 10px -20px;
  }
}

.checkout-copy h1 {
  margin: 0;
  font-size: clamp(34px, 3.8vw, 62px);
  line-height: 1;
  letter-spacing: 0.06em;
  text-wrap: balance;
}

.checkout-lead {
  max-width: 560px;
  margin: 24px 0 0;
  color: rgba(244, 238, 226, 0.72);
  font-size: 15px;
  line-height: 1.65;
}

.order-summary {
  margin-top: 24px;
  display: inline-flex;
  align-items: center;
  gap: 14px;
  max-width: 100%;
  padding: 12px 0;
  color: rgba(244, 238, 226, 0.7);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-family: "Forum", "Forum Fallback", "Alice", "Alice Fallback", serif;
  font-size: 13px;
  line-height: 1.45;
  border-top: 1px solid rgba(216, 174, 103, 0.18);
  border-bottom: 1px solid rgba(216, 174, 103, 0.18);
}

.order-summary::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(216, 174, 103, 0.8);
  box-shadow: 0 0 18px rgba(216, 174, 103, 0.32);
}

.question-summary {
  max-width: 100%;
  margin: 0;
  padding: 13px 0 0;
  color: rgba(244, 238, 226, 0.62);
  font-size: 13px;
  line-height: 1.55;
  letter-spacing: 0.04em;
  overflow-wrap: anywhere;
}

.price-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(216, 174, 103, 0.18);
}

.price-row span {
  color: rgba(244, 238, 226, 0.58);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-size: 12px;
}

.price-row strong {
  color: var(--ink);
  font-family: "Forum", "Forum Fallback", "Alice", "Alice Fallback", serif;
  font-size: clamp(34px, 4vw, 54px);
  letter-spacing: 0.04em;
}

/* ═══════════════════════════════════════════════════════════════
   FORM
   ═══════════════════════════════════════════════════════════════ */

.checkout-form {
  display: flex;
  flex-direction: column;
  gap: 22px;
  justify-self: end;
  width: min(100%, 470px);
  min-width: 0;
}

.field-group {
  display: flex;
  flex-direction: column;
}

.field-label {
  display: block;
  margin-bottom: 12px;
  font-family: "Forum", "Forum Fallback", "Alice", "Alice Fallback", serif;
  font-size: 18px;
  letter-spacing: 0.08em;
  color: rgba(244, 238, 226, 0.88);
}

.checkout-input {
  width: 100%;
  min-height: 64px;
  padding: 18px 22px;
  font-family: "Montserrat", "Montserrat Fallback", Inter, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: rgba(244, 238, 226, 0.04);
  border: 1px solid rgba(216, 174, 103, 0.3);
  border-radius: 8px;
  outline: none;
  cursor: text !important;
  transition:
    border-color 0.35s ease,
    background 0.35s ease,
    box-shadow 0.35s ease;
}

.checkout-input::placeholder {
  color: rgba(244, 238, 226, 0.32);
  font-style: italic;
}

.checkout-input:hover {
  border-color: rgba(216, 174, 103, 0.5);
  background: rgba(244, 238, 226, 0.06);
}

.checkout-input:focus {
  border-color: rgba(216, 174, 103, 0.75);
  background: rgba(244, 238, 226, 0.07);
  box-shadow: 0 0 0 3px rgba(216, 174, 103, 0.1),
    0 8px 32px rgba(0, 0, 0, 0.24);
}

.checkout-input.is-valid {
  border-color: rgba(180, 210, 180, 0.5);
}

.checkout-input.is-invalid {
  border-color: rgba(210, 120, 100, 0.65);
}

.consent-group {
  margin: 0;
  padding: 0;
  border: 0;
  display: grid;
  gap: 10px;
}

.consent-item {
  display: grid;
  grid-template-columns: 19px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 0;
  color: rgba(244, 238, 226, 0.82);
  cursor: pointer !important;
  transition: color 0.25s ease;
}

.consent-item input {
  appearance: none;
  -webkit-appearance: none;
  margin: 2px 0 0;
  width: 19px;
  height: 19px;
  border-radius: 999px;
  border: 1px solid rgba(216, 174, 103, 0.45);
  background: rgba(244, 238, 226, 0.03);
  box-shadow:
    inset 0 0 0 1px rgba(0, 0, 0, 0.22),
    0 0 0 1px rgba(0, 0, 0, 0.1);
  display: grid;
  place-items: center;
  cursor: pointer !important;
  transition:
    border-color 0.25s ease,
    background 0.25s ease,
    box-shadow 0.25s ease,
    transform 0.25s ease;
}

.consent-item:hover input {
  border-color: rgba(216, 174, 103, 0.75);
  background: rgba(216, 174, 103, 0.08);
}

.consent-item input:checked {
  background: var(--gold);
  border-color: rgba(216, 174, 103, 0.95);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 18 18' fill='none'%3E%3Cpath d='M4 9l3 3 7-7' stroke='%23020004' stroke-width='2.3' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 12px 12px;
  box-shadow:
    0 0 0 1px rgba(0, 0, 0, 0.12),
    0 0 18px rgba(216, 174, 103, 0.22);
}

.consent-item span {
  min-width: 0;
  font-size: 13px;
  line-height: 1.55;
}

.legal-link {
  color: rgba(216, 174, 103, 0.9);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer !important;
  transition: color 0.25s ease, opacity 0.25s ease;
}

.legal-link:hover {
  color: var(--gold);
}

.consent-item input:focus-visible {
  outline: 2px solid rgba(216, 174, 103, 0.55);
  outline-offset: 2px;
}

.checkout-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 4px;
}

.cancel-btn {
  min-height: 32px;
  padding: 0 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--muted);
  font-family: "Montserrat", "Montserrat Fallback", Inter, system-ui, sans-serif;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  line-height: 1.4;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
  text-transform: uppercase;
  cursor: pointer !important;
  transition:
    color 0.25s ease,
    opacity 0.25s ease;
}

.cancel-btn:hover {
  color: var(--ink);
}

.checkout-pay-btn {
  --morph-btn-size: 176px;
  width: var(--morph-btn-size);
  height: var(--morph-btn-size);
  margin: 0;
  opacity: 0.36;
  filter: grayscale(0.55);
  transition: opacity 0.35s ease, filter 0.35s ease, transform 0.35s ease;
  cursor: not-allowed !important;
}

.checkout-pay-btn.activation-pulse {
  animation: checkoutActivationPulse 620ms cubic-bezier(.22,.61,.36,1) both;
}

@keyframes checkoutActivationPulse {
  45% { filter: drop-shadow(0 0 24px rgba(216, 174, 103, 0.42)); }
}

.lava-widget-email-warning {
  margin: 0;
  padding: 12px 14px;
  border-left: 2px solid rgba(216, 174, 103, 0.72);
  color: rgba(244, 238, 226, 0.78);
  background: rgba(216, 174, 103, 0.07);
  font-size: 13px;
  line-height: 1.55;
}

.lava-widget-email-warning[hidden] {
  display: none !important;
}

.payment-methods {
  width: 100%;
  margin: 4px 0 0;
  padding: 18px;
  border: 1px solid rgba(224, 178, 71, 0.42);
  border-radius: 18px;
  background: rgba(5, 5, 5, 0.72);
}

.payment-methods[hidden] {
  display: none !important;
}

.payment-methods legend {
  padding: 0 10px;
  color: #e5c16f;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

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

.payment-method-btn {
  min-height: 52px;
  padding: 12px 16px;
  border: 1px solid rgba(224, 178, 71, 0.72);
  border-radius: 999px;
  background: rgba(224, 178, 71, 0.1);
  color: #f4eee2;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease, opacity 160ms ease;
}

.payment-method-btn:hover,
.payment-method-btn:focus-visible {
  background: #dfb547;
  color: #090806;
  outline: none;
}

.payment-method-btn:disabled {
  cursor: wait;
  opacity: 0.48;
}

.checkout-pay-btn[hidden] {
  display: none !important;
}

.checkout-pay-btn.is-active {
  opacity: 1;
  filter: grayscale(0);
  cursor: pointer !important;
}

.checkout-pay-btn .morph-btn__text {
  font-size: 12px;
  letter-spacing: 0.14em;
  padding-inline: 12px;
  line-height: 1.25;
  transform: translateY(-4px);
}

.checkout-lava-widget {
  width: min(100%, 270px);
}

.lava-widget-shell {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.lava-widget-frame {
  display: block;
  width: 100%;
  height: 50px;
}

.lava-widget-frame iframe {
  display: block;
  width: 270px;
  max-width: 100%;
  height: 50px;
  border: 0;
}

.form-status {
  min-height: 1.4em;
  margin: 0;
  color: rgba(180, 210, 180, 0.82);
  font-size: 12px;
  letter-spacing: 0.08em;
  line-height: 1.55;
}

.form-status.is-error {
  padding: 12px 14px;
  color: rgba(255, 226, 202, 0.96);
  background: rgba(130, 42, 28, 0.28);
  border: 1px solid rgba(216, 119, 91, 0.54);
  border-radius: 8px;
  letter-spacing: 0.03em;
}

.form-status.is-info {
  color: rgba(180, 210, 180, 0.86);
}

/* ═══════════════════════════════════════════════════════════════
   RESPONSIVE
   ═══════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .checkout-header {
    top: max(20px, calc(env(safe-area-inset-top) + 18px));
    left: max(20px, calc(env(safe-area-inset-left) + 20px));
    right: auto;
    transform: none;
  }

  body.checkout-page-body .locale-switcher {
    top: max(24px, calc(env(safe-area-inset-top) + 22px));
    right: max(20px, calc(env(safe-area-inset-right) + 20px));
  }

  .checkout-hero {
    padding: 92px 20px 28px;
    max-width: 100%;
  }

  .checkout-layout {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 28px;
    text-align: center;
  }

  .checkout-copy {
    align-items: center;
    max-width: 640px;
    text-align: center;
  }

  .eyebrow {
    align-self: center;
  }

  .checkout-copy h1 {
    font-size: clamp(30px, 8vw, 48px);
  }

  .checkout-lead {
    max-width: 100%;
    margin-inline: auto;
    font-size: 14px;
  }

  .order-summary {
    justify-content: center;
    text-align: center;
  }

  .question-summary {
    max-width: min(100%, 520px);
    text-align: center;
  }

  .price-row {
    justify-content: center;
    width: min(100%, 360px);
    text-align: center;
  }

  .price-row strong {
    font-size: clamp(30px, 7vw, 44px);
  }

  .checkout-form {
    justify-self: center;
    width: min(100%, 460px);
    text-align: left;
  }

  .field-label {
    text-align: center;
  }

  .checkout-actions {
    flex-direction: column;
    align-items: center;
  }

  .cancel-btn {
    order: 2;
    width: auto;
  }

  .checkout-pay-btn {
    --morph-btn-size: calc(100vw - 30px);
    width: var(--morph-btn-size);
    max-width: calc(100vw - 30px);
    height: auto;
    min-height: 64px;
    padding: 20px 10px;
    border-radius: 16px;
    order: 1;
    align-self: center;
  }

  .checkout-lava-widget {
    order: 1;
    width: min(100%, 270px);
  }

  .checkout-pay-btn::after {
    inset: 4px;
    border-radius: 14px;
  }

  .checkout-pay-btn .morph-btn__canvas {
    width: 112%;
    height: 120%;
    top: 50%;
    transform: translate(-50%, -50%);
    border-radius: inherit;
  }

  .checkout-pay-btn .morph-btn__text {
    width: auto;
    min-height: auto;
    padding: 0;
    line-height: 1.12;
    letter-spacing: 0.07em;
    text-align: center;
    transform: none;
    white-space: nowrap;
  }

}

@media (max-width: 540px) {
  .checkout-layout {
    gap: 28px;
  }

  .checkout-content {
    min-width: 0;
    overflow: hidden;
  }

  .checkout-content::before {
    content: none;
  }

  .checkout-copy,
  .checkout-form {
    min-width: 0;
  }

  .eyebrow {
    max-width: 100%;
    padding: 6px 12px;
    font-size: 9px;
    letter-spacing: 0.06em;
    line-height: 1.35;
    white-space: normal;
    text-align: center;
  }

  .checkout-copy h1 {
    font-size: clamp(23px, 6.8vw, 32px);
    line-height: 1.04;
    letter-spacing: 0.03em;
    overflow-wrap: break-word;
    text-wrap: balance;
  }

  .checkout-lead {
    max-width: 100%;
    font-size: 12px;
    line-height: 1.5;
    overflow-wrap: break-word;
  }

  .order-summary {
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.08em;
    text-align: center;
    text-wrap: balance;
  }

  .question-summary {
    font-size: 12px;
    line-height: 1.45;
  }

  .price-row {
    flex-direction: column;
    align-items: center;
    gap: 6px;
  }

  .price-row span {
    font-size: 11px;
  }

  .price-row strong {
    font-size: clamp(24px, 10vw, 32px);
  }

  .checkout-pay-btn {
    --morph-btn-size: calc(100vw - 30px);
  }

  .payment-methods {
    padding: 14px;
  }

  .payment-method-grid {
    grid-template-columns: 1fr;
  }

  .field-label {
    font-size: 15px;
    line-height: 1.3;
  }

  .consent-item {
    grid-template-columns: 19px minmax(0, 1fr);
    gap: 12px;
  }

  .consent-item span {
    font-size: 12px;
    overflow-wrap: anywhere;
  }

}
