/* ── Checkout page layout ── */
.checkout-body {
  min-height: 100vh;
  background: var(--bg);
}

.checkout-main {
  min-height: calc(100vh - 73px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6rem 5vw 4rem;
}

.checkout-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  width: 100%;
  max-width: 860px;
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  box-shadow: 0 40px 100px rgba(0,0,0,0.5);
}

/* ── Left: plan summary ── */
.checkout-summary {
  background: linear-gradient(145deg, var(--bg3), var(--bg2));
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
}
.checkout-summary-inner { flex: 1; }

.checkout-plan-badge {
  display: inline-block;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: .3rem .85rem;
  border-radius: 100px;
  margin-bottom: 1.4rem;
}

.checkout-plan-price {
  margin-bottom: .75rem;
  line-height: 1;
}
.checkout-price-amount {
  font-family: 'Instrument Serif', serif;
  font-size: 3rem;
  color: var(--white);
}
.checkout-price-period {
  font-size: .9rem;
  color: var(--muted);
  margin-left: .3rem;
}

.checkout-plan-desc {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 1.8rem;
}

.checkout-features {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: .75rem;
  margin-bottom: 2.5rem;
}
.checkout-features li {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .9rem;
  color: var(--white);
}
.check-icon {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: rgba(139,92,246,0.2);
  color: var(--purple-lt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .7rem;
  font-weight: 700;
  flex-shrink: 0;
  line-height: 18px;
  text-align: center;
}

.checkout-secure {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--muted);
  margin-top: auto;
}

/* ── Right: form panel ── */
.checkout-form-panel {
  background: var(--bg2);
  padding: 2.5rem;
  display: flex;
  flex-direction: column;
}

.checkout-heading {
  font-family: 'Instrument Serif', serif;
  font-size: 2.1rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: .4rem;
  line-height: 1.2;
}
.checkout-heading em {
  font-style: normal;
  color: var(--white);
  -webkit-text-fill-color: var(--white);
}
.checkout-subheading {
  font-size: .88rem;
  color: var(--muted);
  margin-bottom: 2rem;
}

/* ── Form fields ── */
.form-group {
  display: flex;
  flex-direction: column;
  gap: .4rem;
  margin-bottom: 1.2rem;
}
.form-group label {
  font-size: .82rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: .03em;
}
.form-group input {
  background: var(--bg3);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: .75rem 1rem;
  font-family: 'Satoshi', sans-serif;
  font-size: .95rem;
  color: var(--white);
  outline: none;
  transition: border-color .2s, box-shadow .2s;
  width: 100%;
}
.form-group input::placeholder { color: var(--muted); opacity: .6; }
.form-group input:focus {
  border-color: var(--purple);
  box-shadow: 0 0 0 3px rgba(139,92,246,0.18);
}

.field-error {
  font-size: .78rem;
  color: #f87171;
  min-height: 1.1em;
}

/* ── Pay button ── */
.checkout-pay-btn {
  width: 100%;
  padding: .9rem 1.5rem;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  color: #fff;
  font-family: 'Satoshi', sans-serif;
  font-size: 1rem;
  font-weight: 600;
  border: none;
  border-radius: 12px;
  cursor: pointer;
  letter-spacing: .02em;
  box-shadow: 0 0 28px rgba(139,92,246,0.45);
  transition: box-shadow .25s, transform .2s, opacity .2s;
  margin-top: .5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  text-decoration: none;
}
.checkout-pay-btn:hover:not(:disabled) {
  box-shadow: 0 0 44px rgba(232,121,249,0.55);
  transform: translateY(-1px);
}
.checkout-pay-btn:disabled {
  opacity: .65;
  cursor: not-allowed;
  transform: none;
}

/* Spinner */
.btn-loader {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: #fff;
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.checkout-terms {
  font-size: .75rem;
  color: var(--muted);
  text-align: center;
  margin-top: 1rem;
  line-height: 1.6;
}
.checkout-terms a {
  color: var(--purple-lt);
  text-decoration: none;
}
.checkout-terms a:hover { text-decoration: underline; }

/* ── Payment method badges ── */
.checkout-payment-logos {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 1.8rem;
  flex-wrap: wrap;
}
.checkout-payment-logos > span {
  font-size: .75rem;
  color: var(--muted);
}
.payment-badges {
  display: flex;
  gap: .4rem;
  flex-wrap: wrap;
}
.pay-badge {
  font-size: .72rem;
  font-weight: 500;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: .2rem .55rem;
  letter-spacing: .02em;
}

/* ── Success page ── */
.success-card {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 3rem 2.5rem;
  max-width: 460px;
  width: 100%;
  text-align: center;
  box-shadow: 0 40px 100px rgba(0,0,0,0.4);
}

.success-icon {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--purple), var(--pink));
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.5rem;
  box-shadow: 0 0 32px rgba(139,92,246,0.4);
  color: #fff;
}

.success-heading {
  font-family: 'Instrument Serif', serif;
  font-size: 2rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: .6rem;
}
.success-sub {
  font-size: .95rem;
  color: var(--muted);
  line-height: 1.6;
}

.success-payment-id {
  display: flex;
  flex-direction: column;
  gap: .3rem;
  align-items: center;
  margin-top: 1.5rem;
  padding: .9rem 1.2rem;
  background: var(--bg3);
  border-radius: 10px;
  border: 1px solid var(--border);
}
.success-payment-id span {
  font-size: .75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.success-payment-id code {
  font-size: .85rem;
  color: var(--purple-lt);
  word-break: break-all;
}

/* ── Coupon field ── */
.coupon-optional {
  font-weight: 400;
  opacity: .6;
  font-size: .78rem;
}
.coupon-success-msg {
  background: rgba(34, 197, 94, 0.1);
  border: 1px solid rgba(34, 197, 94, 0.35);
  color: #4ade80;
  border-radius: 10px;
  padding: .85rem 1.1rem;
  font-size: .9rem;
  margin-bottom: 1.2rem;
  text-align: center;
}

/* ── Invite-only modal ── */
.invite-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(4px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 1.5rem;
}
.invite-modal-box {
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem 2rem;
  max-width: 420px;
  width: 100%;
  text-align: center;
  box-shadow: 0 24px 60px rgba(0,0,0,0.4);
}
.invite-modal-headline {
  font-family: 'Instrument Serif', serif;
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--white);
  margin-bottom: .75rem;
}
.invite-modal-body {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.65;
  margin-bottom: 1.75rem;
}
.invite-modal-close {
  background: var(--purple);
  color: var(--white);
  border: none;
  border-radius: 999px;
  padding: .6rem 2rem;
  font-size: .9rem;
  cursor: pointer;
  transition: opacity .2s;
}
.invite-modal-close:hover { opacity: .85; }

/* ── Mobile ── */
@media(max-width: 700px) {
  .checkout-wrapper {
    grid-template-columns: 1fr;
    border-radius: 16px;
  }
  .checkout-summary { padding: 2rem 1.5rem; }
  .checkout-form-panel { padding: 2rem 1.5rem; }
  .checkout-main { padding: 5.5rem 1rem 3rem; align-items: flex-start; }
  .success-card { padding: 2rem 1.5rem; }
}
