/* Purchase / checkout page — uses tokens from main.css. */

body {
  display: flex; align-items: center; justify-content: center;
  padding: 1.25rem; min-height: 100vh;
  background: var(--bg);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px; padding: 2.5rem 2.25rem;
  max-width: 440px; width: 100%; text-align: center;
  animation: up 0.45s var(--smooth) both;
  position: relative;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 14%; right: 14%; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}
@keyframes up { from { opacity: 0; transform: translateY(16px) scale(0.98); } to { opacity: 1; transform: none; } }

.badge-icon {
  width: 72px; height: 72px; border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 1.4rem; font-size: 1.75rem;
  transition: transform 0.3s var(--spring);
}
.badge-icon:hover { transform: scale(1.05) rotate(-2deg); }
.badge-icon i { color: var(--bg); }

h1   { font-size: 1.65rem; font-weight: 800; margin-bottom: 0.35rem; letter-spacing: -0.02em; }
.desc { color: var(--text-secondary); font-size: 0.9rem; line-height: 1.5; margin-bottom: 1rem; }

.price {
  font-size: 2.25rem; font-weight: 800;
  color: var(--text); margin: 0.75rem 0;
  letter-spacing: -0.03em;
}
.price span { font-size: 0.88rem; color: var(--text-secondary); font-weight: 500; }

.features {
  text-align: left; margin: 1.25rem 0; padding: 1rem 1.1rem;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px;
}
.features li {
  list-style: none; padding: 0.42rem 0;
  color: var(--text-secondary); font-size: 0.88rem;
  display: flex; align-items: center; gap: 0.5rem;
}
.features li i { color: #4ade80; font-size: 0.78rem; flex-shrink: 0; }

/* Stripe card element */
#card-element {
  padding: 1.1rem 1rem; margin: 1.4rem 0 0.25rem;
  background: var(--surface-2); border: 1.5px solid var(--border); border-radius: 12px;
  min-height: 56px; display: flex; flex-direction: column; justify-content: center;
  transition: border-color 0.2s;
}
#card-element.StripeElement--focus   { border-color: var(--border-bright); }
#card-element.StripeElement--invalid { border-color: rgba(239,68,68,0.6); }

.error-msg {
  min-height: 22px; font-size: 0.83rem; font-weight: 500;
  color: #f87171; margin-bottom: 1rem; text-align: left;
  display: flex; align-items: center; gap: 0.35rem;
}
.error-msg:empty { margin-bottom: 0; }

.btn {
  display: block; width: 100%; padding: 0.92rem;
  border: none; border-radius: 12px; font-size: 0.97rem; font-weight: 700;
  font-family: 'Outfit', sans-serif; cursor: pointer;
  transition: opacity 0.2s; text-decoration: none; text-align: center;
}
.btn-pay  { background: var(--text); color: var(--bg); }
.btn-pay:hover:not(:disabled) { opacity: 0.88; }
.btn-pay:disabled { opacity: 0.5; cursor: not-allowed; }
.btn-back {
  background: transparent; color: var(--text-secondary);
  margin-top: 0.75rem; border: 1px solid var(--border);
}
.btn-back:hover { border-color: var(--border-bright); color: var(--text); }

.secure {
  margin-top: 1.25rem; font-size: 0.8rem; color: var(--text-secondary);
  display: flex; align-items: center; justify-content: center; gap: 0.4rem;
}
.secure i { color: #4ade80; }

.state-card { display: none; }

/* Status card badge icons */
#loadingCard .badge-icon { background: var(--surface-2); border: 1px solid var(--border); }
#successCard .badge-icon { background: rgba(34,197,94,0.12); border: 1px solid rgba(34,197,94,0.25); }
#errorCard   .badge-icon { background: rgba(239,68,68,0.1);  border: 1px solid rgba(239,68,68,0.22); }
#successCard .badge-icon i { color: #4ade80; }
#errorCard   .badge-icon i { color: #f87171; }
#loadingCard .badge-icon i { color: var(--text); }

.init-spinner { text-align: center; padding: 1.5rem 0 0.5rem; color: var(--text-secondary); font-size: 0.88rem; }

@media (max-width: 480px) {
  .card { padding: 2rem 1.1rem; border-radius: 18px; }
  h1 { font-size: 1.4rem; } .price { font-size: 1.9rem; }
  .badge-icon { width: 60px; height: 60px; border-radius: 15px; font-size: 1.45rem; }
}
