/* =========================================================
   NOTION OS — Luxury Checkout v1.3
   Gold accents · button glow · custom loader · payment logos
   ========================================================= */

/* Obsidian Black override for checkout — Diamond v3.0 */
.checkout-body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse 70% 32% at 20% -10%, rgba(212, 175, 55, 0.07), transparent 60%),
    radial-gradient(ellipse 55% 28% at 85% 110%, rgba(212, 175, 55, 0.04), transparent 60%),
    #050505 !important;
}
.checkout-main { padding: 48px 0 80px; }

/* Glassmorphism utility — subtle, premium */
.glass,
.pay-card {
  background: rgba(15, 16, 20, 0.62) !important;
  backdrop-filter: saturate(180%) blur(20px);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.06);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.03) inset,
    0 32px 80px -16px rgba(0, 0, 0, 0.55);
}

/* Stock meter — scarcity indicator */
.stock-meter {
  margin-top: 22px;
  padding: 16px 18px;
  background: rgba(212, 175, 55, 0.05);
  border: 1px solid rgba(212, 175, 55, 0.22);
  border-radius: 12px;
}
.stock-meter-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
  font-family: var(--font-display);
}
.stock-meter-text {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-soft);
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.stock-meter-text::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-gold);
  box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.22);
  animation: stockDot 1.6s ease-in-out infinite;
}
@keyframes stockDot {
  0%, 100% { box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.22); }
  50% { box-shadow: 0 0 0 6px rgba(212, 175, 55, 0.12); }
}
.stock-meter-count {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--accent-gold-bright);
}
.stock-meter-track {
  height: 5px;
  background: rgba(255, 255, 255, 0.04);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.stock-meter-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent-gold), var(--accent-gold-bright));
  border-radius: 999px;
  box-shadow: 0 0 12px rgba(212, 175, 55, 0.5);
  position: relative;
  animation: stockPulse 2.6s ease-in-out infinite;
}
@keyframes stockPulse {
  0%, 100% { box-shadow: 0 0 10px rgba(212, 175, 55, 0.4); }
  50% { box-shadow: 0 0 22px rgba(212, 175, 55, 0.7); }
}
@media (prefers-reduced-motion: reduce) {
  .stock-meter-text::before { animation: none; }
  .stock-meter-fill { animation: none; }
}

@media (max-width: 540px) {
  .stock-meter { padding: 13px 14px; }
  .stock-meter-row { flex-direction: column; align-items: flex-start; gap: 8px; }
  .stock-meter-text { font-size: 11px; letter-spacing: 0.04em; }
  .stock-meter-count { font-size: 11px; align-self: flex-end; }
}

.checkout-grid {
  display: grid;
  grid-template-columns: 0.95fr 1.1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 960px) {
  .checkout-grid { grid-template-columns: 1fr; gap: 20px; }
}

/* ============================================ Order summary (left) */
.order-card {
  background: transparent;
  border: 0;
  border-radius: 0;
  /* Match pay-card top padding (44px) so both columns' eyebrows align */
  padding: 44px 4px 4px 0;
  position: sticky;
  top: 92px;
  box-shadow: none;
}
@media (max-width: 960px) {
  .order-card { position: static; padding: 4px 0; }
}

.order-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 14px;
}

.order-title {
  font-family: var(--font-display);
  font-size: 1.625rem;
  font-weight: 700;
  letter-spacing: -0.028em;
  line-height: 1.15;
  margin-bottom: 10px;
  color: var(--text);
}
.order-tagline {
  font-size: 14px;
  color: var(--text-soft);
  letter-spacing: -0.005em;
  line-height: 1.55;
}

.checkout-hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 28px 0;
}

/* Value cards (replaces simple list) */
.value-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.value-item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  align-items: flex-start;
  padding: 12px 4px;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  transition: none;
}
.value-item:last-child { border-bottom: 0; }
.value-list { gap: 0; }
.value-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 9px;
  background: rgba(212, 175, 55, 0.08);
  color: var(--accent-gold);
  flex-shrink: 0;
  margin-top: 1px;
}
.value-icon svg { width: 16px; height: 16px; stroke-width: 1.6; }
.value-icon-bonus {
  background: rgba(251, 191, 36, 0.16);
  color: var(--accent-amber);
}
.value-row-title {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.012em;
  color: var(--text);
  margin-bottom: 3px;
}
.value-row-sub {
  font-size: 12.5px;
  color: var(--text-muted);
  letter-spacing: -0.005em;
  line-height: 1.5;
}
.value-item-bonus .value-row-title { color: var(--accent-amber); }

/* Guarantee card */
.guarantee-card {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 20px;
  margin-top: 18px;
  background: linear-gradient(180deg, var(--bg-elev) 0%, rgba(212, 175, 55, 0.04) 100%);
  border: 1px solid var(--accent-gold-border);
  border-radius: 14px;
  position: relative;
}
.guarantee-card::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  background: linear-gradient(180deg, transparent 0%, rgba(212, 175, 55, 0.04) 100%);
  pointer-events: none;
}
.guarantee-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(180deg, var(--accent-gold-bright), var(--accent-gold));
  color: #1a1a1a;
  flex-shrink: 0;
  box-shadow: 0 4px 16px -4px rgba(212, 175, 55, 0.4);
}
.guarantee-icon svg { width: 22px; height: 22px; stroke-width: 1.8; }
.guarantee-content { position: relative; }
.guarantee-title {
  font-family: var(--font-display);
  font-size: 14.5px;
  font-weight: 700;
  letter-spacing: -0.018em;
  color: var(--text);
  margin-bottom: 4px;
}
.guarantee-text {
  font-size: 12.5px;
  color: var(--text-soft);
  letter-spacing: -0.005em;
  line-height: 1.5;
}

/* Totals */
.order-totals {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.order-totals-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: var(--text-soft);
}
.order-totals-row-total {
  padding-top: 12px;
  border-top: 1px solid var(--border);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--text);
}
.order-totals-note {
  margin-top: 4px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: -0.005em;
}

/* Trust badges grid */
.trust-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}
.trust-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-soft);
  letter-spacing: -0.005em;
}
.trust-item svg { color: var(--success-bright); flex-shrink: 0; }

/* Testimonial */
.testimonial {
  margin-top: 22px;
  padding: 18px 20px;
  background: var(--bg-elev);
  border-left: 3px solid var(--accent-gold);
  border-radius: 10px;
}
.testimonial p {
  font-size: 13.5px;
  color: var(--text-soft);
  font-style: italic;
  line-height: 1.55;
  letter-spacing: -0.005em;
  margin-bottom: 10px;
}
.testimonial-author {
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

/* ============================================ Payment form (right) */
.pay-card {
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: 24px;
  padding: 44px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.04) inset,
    0 0 0 1px rgba(212, 175, 55, 0.06),
    0 32px 80px -16px rgba(0, 0, 0, 0.55),
    0 8px 24px -12px rgba(212, 175, 55, 0.12);
}
@media (max-width: 960px) { .pay-card { padding: 28px 24px; } }

.pay-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent-gold);
  margin-bottom: 14px;
}
.pay-eyebrow svg { width: 14px; height: 14px; }

.pay-head { margin-bottom: 30px; }
.pay-title {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.028em;
  margin-bottom: 8px;
  color: var(--text);
}
.pay-sub {
  font-size: 13.5px;
  color: var(--text-soft);
  letter-spacing: -0.005em;
  line-height: 1.55;
}

.field-group { margin-bottom: 20px; }
.field-label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 8px;
}
.field-input {
  width: 100%;
  height: 48px;
  padding: 0 16px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  font: inherit;
  font-size: 14.5px;
  letter-spacing: -0.005em;
  background: var(--bg-elev);
  color: var(--text);
  transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}
.field-input::placeholder { color: var(--text-muted); }
.field-input:focus {
  outline: 0;
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}
.field-hint {
  margin-top: 8px;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: -0.005em;
}

/* Stripe Element mount */
.stripe-mount {
  padding: 16px;
  border: 1px solid var(--border-strong);
  border-radius: 12px;
  background: var(--bg-elev);
  min-height: 68px;
  transition: border-color 0.2s var(--ease);
}
.stripe-mount:focus-within {
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.06);
}
.stripe-placeholder {
  display: flex;
  align-items: center;
  gap: 12px;
  height: 36px;
  font-size: 13.5px;
  color: var(--text-muted);
  letter-spacing: -0.005em;
}
.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid var(--border-strong);
  border-top-color: var(--text);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

/* ============================================ Pay button — luxury glow */
.btn-pay {
  position: relative;
  width: 100%;
  height: 60px;
  margin-top: 8px;
  background: linear-gradient(180deg, #1a1a14 0%, #0a0a07 100%);
  color: #fafafa;
  border: 1px solid rgba(212, 175, 55, 0.42);
  border-radius: 14px;
  font-family: var(--font-display);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: -0.008em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition: transform 0.28s var(--ease), background 0.28s var(--ease), border-color 0.28s var(--ease), color 0.28s var(--ease), box-shadow 0.4s var(--ease);
  overflow: hidden;
  animation: payIdleGlow 3.4s ease-in-out infinite;
}
@keyframes payIdleGlow {
  0%, 100% {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.05) inset,
      0 0 0 1px rgba(212, 175, 55, 0.18),
      0 10px 32px -8px rgba(212, 175, 55, 0.36),
      0 0 24px -8px rgba(212, 175, 55, 0.18);
  }
  50% {
    box-shadow:
      0 1px 0 rgba(255, 255, 255, 0.08) inset,
      0 0 0 1px rgba(212, 175, 55, 0.55),
      0 14px 48px -6px rgba(212, 175, 55, 0.62),
      0 0 110px -8px rgba(212, 175, 55, 0.55);
  }
}
.btn-pay:not(:disabled):hover {
  transform: translateY(-1px);
  background: linear-gradient(180deg, #25221a 0%, #14110a 100%);
  border-color: var(--accent-gold);
  color: var(--accent-gold-bright);
  animation-play-state: paused;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.07) inset,
    0 0 0 1px rgba(212, 175, 55, 0.45),
    0 14px 44px -10px rgba(212, 175, 55, 0.55),
    0 0 100px -12px rgba(212, 175, 55, 0.45);
}
@media (prefers-reduced-motion: reduce) {
  .btn-pay { animation: none; }
}
.btn-pay:disabled {
  animation: none;
  opacity: 0.4;
  box-shadow: none;
  color: var(--text-muted);
  background: var(--bg-elev);
  border-color: var(--border-strong);
  cursor: not-allowed;
}
.btn-pay:not(:disabled):hover {
  transform: translateY(-1px);
  background: #fff;
  box-shadow:
    0 1px 0 rgba(0, 0, 0, 0.2) inset,
    0 0 0 1px rgba(212, 175, 55, 0.12),
    0 12px 38px -8px rgba(255, 255, 255, 0.32),
    0 0 80px -16px rgba(212, 175, 55, 0.4);
}
.btn-pay:not(:disabled):active { transform: translateY(0); }
.btn-pay:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  box-shadow: none;
}
.btn-pay-icon { transition: transform 0.22s var(--ease); }
.btn-pay:not(:disabled):hover .btn-pay-icon { transform: translateX(3px); }

/* Custom loader: 3-dot bounce */
.btn-pay-loader {
  display: none;
  align-items: center;
  gap: 5px;
}
.btn-pay-loader span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: currentColor;
  display: inline-block;
  animation: payBounce 1.3s ease-in-out infinite both;
}
.btn-pay-loader span:nth-child(1) { animation-delay: -0.32s; }
.btn-pay-loader span:nth-child(2) { animation-delay: -0.16s; }
@keyframes payBounce {
  0%, 80%, 100% { transform: scale(0.25); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.btn-pay.is-busy {
  cursor: progress;
  background: var(--text);
  color: var(--bg);
  opacity: 0.92;
}
.btn-pay.is-busy::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(0, 0, 0, 0.08), transparent);
  animation: payShimmer 1.8s linear infinite;
}
@keyframes payShimmer {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.btn-pay.is-busy .btn-pay-icon { display: none; }
.btn-pay.is-busy .btn-pay-loader { display: inline-flex; }
@media (prefers-reduced-motion: reduce) {
  .btn-pay-loader span { animation: none; opacity: 1; }
  .btn-pay.is-busy::after { animation: none; }
}

.pay-error {
  margin-top: 14px;
  padding: 12px 14px;
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.32);
  border-radius: 10px;
  font-size: 13px;
  color: #fca5a5;
  letter-spacing: -0.005em;
}

/* Payment method logos row */
.payment-methods {
  margin-top: 22px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
}
.payment-method {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  text-transform: uppercase;
  transition: color 0.22s var(--ease), border-color 0.22s var(--ease);
}
.payment-method:hover {
  color: var(--text-muted);
  border-color: var(--border-strong);
}

.pay-fineprint {
  margin-top: 18px;
  font-size: 11.5px;
  color: var(--text-muted);
  line-height: 1.6;
  letter-spacing: -0.005em;
  text-align: center;
}
.pay-fineprint a {
  color: var(--text-soft);
  border-bottom: 1px solid var(--border-strong);
}
.pay-fineprint strong { color: var(--text-soft); font-weight: 600; }

/* Fatal error state */
.checkout-error {
  padding: 28px;
  background: var(--bg-elev);
  border: 1px solid rgba(239, 68, 68, 0.32);
  border-radius: 14px;
  text-align: center;
}
.checkout-error-title {
  font-family: var(--font-display);
  font-size: 1.125rem;
  font-weight: 700;
  letter-spacing: -0.022em;
  margin-bottom: 10px;
  color: var(--text);
}
.checkout-error-desc {
  font-size: 13.5px;
  color: var(--text-soft);
  letter-spacing: -0.005em;
  margin-bottom: 10px;
}
.checkout-error-detail {
  font-size: 12.5px;
  color: var(--text-muted);
}
.checkout-error-detail a {
  color: var(--text);
  border-bottom: 1px solid var(--border-strong);
}

/* Lang toggle reuses portal styles */

/* ============================================ Test Mode badge (developer-only) */
.test-mode-badge {
  position: fixed;
  bottom: 22px;
  right: 22px;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px 11px 14px;
  background: rgba(251, 191, 36, 0.15);
  border: 1.5px solid rgba(251, 191, 36, 0.55);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #fbbf24;
  box-shadow:
    0 12px 32px -8px rgba(0, 0, 0, 0.65),
    0 0 40px -4px rgba(251, 191, 36, 0.48),
    0 0 80px -12px rgba(251, 191, 36, 0.35);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 200;
  pointer-events: none;
  animation: testModeGlow 2.4s ease-in-out infinite;
}
.test-mode-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.32);
  animation: testModePulse 1.4s ease-in-out infinite;
}
@keyframes testModePulse {
  0%, 100% { box-shadow: 0 0 0 4px rgba(251, 191, 36, 0.32); }
  50% { box-shadow: 0 0 0 8px rgba(251, 191, 36, 0.14); }
}
@keyframes testModeGlow {
  0%, 100% {
    box-shadow:
      0 12px 32px -8px rgba(0, 0, 0, 0.65),
      0 0 40px -4px rgba(251, 191, 36, 0.42),
      0 0 80px -12px rgba(251, 191, 36, 0.28);
  }
  50% {
    box-shadow:
      0 12px 32px -8px rgba(0, 0, 0, 0.65),
      0 0 56px -4px rgba(251, 191, 36, 0.62),
      0 0 110px -12px rgba(251, 191, 36, 0.5);
  }
}
@media (prefers-reduced-motion: reduce) {
  .test-mode-badge, .test-mode-dot { animation: none; }
}
@media (max-width: 480px) {
  .test-mode-badge { bottom: 14px; right: 14px; font-size: 11px; padding: 9px 14px 9px 11px; }
}

/* Inline test-mode hint near the eyebrow inside the pay-card */
.pay-test-inline {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-left: 10px;
  padding: 2px 8px;
  background: rgba(251, 191, 36, 0.12);
  border: 1px solid rgba(251, 191, 36, 0.38);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #fbbf24;
  vertical-align: middle;
}
.pay-test-inline::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #fbbf24;
  box-shadow: 0 0 0 2.5px rgba(251, 191, 36, 0.28);
}

/* Inline live-mode shield — only when pk_live_ is detected */
.pay-live-shield {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-left: 10px;
  padding: 3px 9px 3px 7px;
  background: rgba(16, 185, 129, 0.12);
  border: 1px solid rgba(16, 185, 129, 0.42);
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #34d399;
  vertical-align: middle;
  box-shadow: 0 0 14px -4px rgba(16, 185, 129, 0.4);
}
.pay-live-shield svg {
  width: 12px;
  height: 12px;
  flex-shrink: 0;
}

/* ============================================ Encryption Seal */
.encryption-seal {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 16px;
  padding: 14px 18px;
  background: rgba(212, 175, 55, 0.04);
  border: 1px solid rgba(212, 175, 55, 0.18);
  border-radius: 12px;
  position: relative;
}
.encryption-seal-icon {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(180deg, #e6c454, #d4af37);
  color: #0a0a0a;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 14px -4px rgba(212, 175, 55, 0.45);
}
.encryption-seal-icon svg { width: 18px; height: 18px; stroke-width: 2; }
.encryption-seal-title {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.012em;
  color: var(--text);
  margin-bottom: 2px;
}
.encryption-seal-sub {
  font-size: 11px;
  color: var(--text-muted);
  letter-spacing: 0.02em;
  font-family: var(--font-mono);
}
