/* ═══════════════════════════════════════════════════
   VedNex Schedules — Checkout CSS
   Calm, clear, trust-building. Converts.
═══════════════════════════════════════════════════ */

/* ── Logo product name suffix ── */
.logo-product-name {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--emerald);
  line-height: 1;
  display: block;
  margin-top: 1px;
}

/* ═══════════════════
   CHECKOUT HEADER
═══════════════════ */
.checkout-header {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center;
  justify-content: space-between; flex-wrap: wrap; gap: 1rem;
  padding: 1rem clamp(1.5rem, 5vw, 2.5rem);
  background: rgba(248,247,244,0.95);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.checkout-trust-strip {
  display: flex; align-items: center; gap: 0.6rem;
  flex-wrap: wrap;
}
.trust-item {
  display: flex; align-items: center; gap: 0.35rem;
  font-size: 12px; font-weight: 500; color: var(--text-muted);
}
.trust-sep { color: var(--text-dim); font-size: 12px; }

/* ═══════════════════
   MAIN LAYOUT
═══════════════════ */
.checkout-main {
  min-height: 100vh;
  padding: clamp(2rem,5vw,3.5rem) clamp(1.5rem,5vw,2.5rem);
  position: relative; z-index: 2;
}

.checkout-grid {
  display: grid;
  grid-template-columns: 1fr 400px;
  gap: clamp(2rem, 4vw, 3.5rem);
  max-width: 1060px;
  margin: 0 auto;
  align-items: start;
}

/* ═══════════════════
   LEFT PANEL
═══════════════════ */
.checkout-left { display: flex; flex-direction: column; gap: 2rem; }

/* ── Step indicator ── */
.checkout-steps {
  display: flex; align-items: center; gap: 0;
  margin-bottom: 0.5rem;
}
.checkout-step {
  display: flex; align-items: center; gap: 0.5rem;
  opacity: 0.35; transition: opacity 0.3s;
}
.checkout-step.active { opacity: 1; }
.checkout-step.done   { opacity: 0.7; }
.step-num {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg2); border: 1.5px solid var(--border-mid);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: var(--text-muted);
  flex-shrink: 0; transition: all 0.3s;
}
.checkout-step.active .step-num {
  background: var(--emerald); border-color: var(--emerald);
  color: white; box-shadow: 0 0 0 3px rgba(22,163,74,0.15);
}
.checkout-step.done .step-num {
  background: var(--emerald-pale); border-color: var(--emerald);
  color: var(--emerald);
}
.step-label { font-size: 13px; font-weight: 500; color: var(--text-muted); white-space: nowrap; }
.checkout-step.active .step-label { color: var(--text-heading); font-weight: 600; }
.step-connector {
  flex: 1; height: 1.5px; background: var(--border); margin: 0 0.75rem;
  min-width: 20px;
}

/* ── Section panels ── */
.checkout-section { display: flex; flex-direction: column; gap: 1.5rem; }
.checkout-section.hidden { display: none; }
.checkout-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.4rem); font-weight: 300;
  color: var(--text-heading); line-height: 1.1;
}
.checkout-section-sub { font-size: 15px; color: var(--text-muted); line-height: 1.7; margin-top: -0.5rem; }

/* Back button */
.checkout-back-btn {
  display: inline-flex; align-items: center; gap: 0.4rem;
  font-size: 13px; font-weight: 500; color: var(--text-muted);
  background: none; border: none; cursor: pointer; padding: 0;
  transition: color 0.25s; width: fit-content;
}
.checkout-back-btn:hover { color: var(--emerald); }

/* ── Plan cards ── */
.plan-cards { display: flex; flex-direction: column; gap: 10px; }

.plan-card {
  display: block; cursor: pointer; position: relative;
}
.plan-card input[type="radio"] {
  position: absolute; opacity: 0; width: 0; height: 0;
}

.plan-card-inner {
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  background: white;
  transition: all 0.25s var(--ease);
  position: relative;
}
.plan-card input:checked + .plan-card-inner,
.plan-card-featured input:checked + .plan-card-inner {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.1), var(--shadow-sm);
}
.plan-card:hover .plan-card-inner { border-color: var(--border-mid); background: var(--bg); }
.plan-card input:checked + .plan-card-inner { background: white; }

/* Featured plan card */
.plan-card-featured .plan-card-inner {
  background: var(--dark);
  border-color: rgba(22,163,74,0.35);
  box-shadow: 0 0 40px rgba(22,163,74,0.08), var(--shadow-md);
}
.plan-card-featured:hover .plan-card-inner { background: var(--dark); }
.plan-card-featured input:checked + .plan-card-inner {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.15), 0 0 40px rgba(22,163,74,0.1);
}

.plan-popular-badge {
  position: absolute; top: -10px; left: 50%; transform: translateX(-50%);
  font-size: 9px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--emerald-light); background: rgba(34,197,94,0.15);
  border: 1px solid rgba(34,197,94,0.3); border-radius: var(--radius-pill);
  padding: 0.22rem 0.75rem; white-space: nowrap; z-index: 2;
}

.plan-card-header {
  display: flex; justify-content: space-between; align-items: flex-start;
  margin-bottom: 0.35rem;
}
.plan-name {
  font-family: var(--font-body); font-size: 15px; font-weight: 600;
  color: var(--text-heading); display: block;
}
.plan-card-featured .plan-name { color: #f0f4ff; }
.plan-sites {
  font-size: 11px; font-weight: 500; color: var(--emerald);
  background: var(--emerald-pale); border-radius: var(--radius-pill);
  padding: 0.15rem 0.55rem; display: inline-block; margin-top: 3px;
}
.plan-card-featured .plan-sites {
  background: rgba(34,197,94,0.15); color: var(--emerald-light);
}
.plan-price-wrap { display: flex; align-items: baseline; gap: 2px; }
.plan-price {
  font-family: var(--font-display); font-size: 1.6rem; font-weight: 300;
  color: var(--text-heading); line-height: 1;
}
.plan-card-featured .plan-price { color: #f0f4ff; }
.plan-period { font-size: 12px; color: var(--text-dim); }
.plan-card-featured .plan-period { color: rgba(255,255,255,0.35); }
.plan-monthly { font-size: 11px; color: var(--text-dim); }
.plan-card-featured .plan-monthly { color: rgba(255,255,255,0.3); }
.plan-ideal { font-size: 12px; color: var(--text-muted); margin-top: 0.5rem; }
.plan-card-featured .plan-ideal { color: rgba(255,255,255,0.45); }

.plan-check-mark {
  position: absolute; top: 1rem; right: 1rem;
  opacity: 0; transition: opacity 0.25s;
}
.plan-card input:checked ~ .plan-card-inner .plan-check-mark,
.plan-card input:checked + .plan-card-inner .plan-check-mark { opacity: 1; }

/* ── Form fields ── */
.checkout-form { display: flex; flex-direction: column; gap: 1.1rem; }

.form-field { display: flex; flex-direction: column; gap: 0.4rem; }
.form-field label {
  font-size: 13px; font-weight: 600; color: var(--text-heading);
  letter-spacing: 0.01em;
}
.req { color: var(--emerald); }
.form-field input {
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-sm);
  background: white;
  font-family: var(--font-body); font-size: 15px;
  color: var(--text-body);
  transition: border-color 0.25s, box-shadow 0.25s;
  outline: none;
}
.form-field input:focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.1);
}
.form-field input::placeholder { color: var(--text-dim); }
.form-hint { font-size: 11.5px; color: var(--text-dim); }

/* Trial notice */
.trial-notice {
  display: flex; align-items: flex-start; gap: 0.9rem;
  background: var(--emerald-pale);
  border: 1px solid rgba(22,163,74,0.2);
  border-radius: var(--radius-sm);
  padding: 1rem 1.1rem;
}
.trial-icon { font-size: 1.3rem; flex-shrink: 0; margin-top: 1px; }
.trial-notice strong { display: block; font-size: 14px; color: var(--text-heading); margin-bottom: 0.25rem; }
.trial-notice p { font-size: 13px; color: var(--text-muted); line-height: 1.65; margin: 0; }

/* ── Buttons ── */
.checkout-next-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  width: 100%; padding: 1rem 1.5rem;
  background: var(--emerald); color: white;
  border: none; border-radius: var(--radius-pill);
  font-family: var(--font-body); font-size: 16px; font-weight: 600;
  cursor: pointer; transition: all 0.3s var(--ease);
  box-shadow: var(--shadow-glow-e);
}
.checkout-next-btn:hover {
  background: #15803d; transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(22,163,74,0.28);
}

.checkout-pay-btn {
  display: flex; align-items: center; justify-content: center; gap: 0.6rem;
  width: 100%; padding: 1rem 1.5rem;
  background: var(--dark); color: #f0f4ff;
  border: 1.5px solid rgba(22,163,74,0.4);
  border-radius: var(--radius-pill);
  font-family: var(--font-body); font-size: 16px; font-weight: 600;
  cursor: pointer; transition: all 0.3s var(--ease);
  box-shadow: 0 0 40px rgba(22,163,74,0.12);
  margin-top: 0.5rem;
}
.checkout-pay-btn:not(:disabled):hover {
  background: #0a1a0f; border-color: var(--emerald);
  box-shadow: 0 0 50px rgba(22,163,74,0.2);
  transform: translateY(-1px);
}
.checkout-pay-btn:disabled { opacity: 0.5; cursor: not-allowed; }
.checkout-pay-btn .spin {
  animation: spin-once 0.8s linear infinite;
}
@keyframes spin-once { to { transform: rotate(360deg); } }

.payment-terms {
  font-size: 11.5px; color: var(--text-dim);
  text-align: center; line-height: 1.6; margin-top: 0.5rem;
}
.payment-terms a { color: var(--emerald); text-decoration: none; }
.payment-terms a:hover { text-decoration: underline; }

/* Stripe card element */
.stripe-card-wrap { display: flex; flex-direction: column; gap: 0.5rem; }
.stripe-card-label {
  font-size: 13px; font-weight: 600; color: var(--text-heading);
}
.stripe-card-element {
  padding: 0.85rem 1rem;
  border: 1.5px solid var(--border-mid);
  border-radius: var(--radius-sm);
  background: white;
  transition: border-color 0.25s, box-shadow 0.25s;
  min-height: 44px;
}
.stripe-card-element.StripeElement--focus {
  border-color: var(--emerald);
  box-shadow: 0 0 0 3px rgba(22,163,74,0.1);
}
.stripe-errors { font-size: 13px; color: #dc2626; min-height: 18px; }

/* ═══════════════════
   RIGHT PANEL — ORDER SUMMARY
═══════════════════ */
.checkout-right { position: sticky; top: 100px; }

.order-summary {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.order-summary::before {
  content: '';
  display: block; height: 2px;
  background: linear-gradient(to right, var(--emerald), var(--gold), var(--purple));
}

.order-summary-header {
  padding: 1.2rem 1.4rem 0.8rem;
  border-bottom: 1px solid var(--border);
}
.order-summary-header h3 {
  font-family: var(--font-body); font-size: 14px; font-weight: 600;
  color: var(--text-heading); letter-spacing: 0.02em;
}

.order-product {
  display: flex; gap: 0.85rem; align-items: flex-start;
  padding: 1.1rem 1.4rem; border-bottom: 1px solid var(--border);
}
.order-product-icon {
  width: 44px; height: 44px; border-radius: 10px;
  background: var(--bg2); border: 1px solid var(--border);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.order-product-info strong { display: block; font-size: 14px; font-weight: 600; color: var(--text-heading); }
.order-product-info span { display: block; font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.order-billing { font-size: 11px !important; color: var(--text-dim) !important; }

.order-line-items { padding: 0.9rem 1.4rem; display: flex; flex-direction: column; gap: 0.55rem; }
.order-line {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--text-muted);
}
.order-free {
  font-size: 11px; font-weight: 700; letter-spacing: 0.08em;
  color: var(--emerald); background: var(--emerald-pale);
  border-radius: var(--radius-pill); padding: 0.15rem 0.55rem;
}

.order-divider { height: 1px; background: var(--border); margin: 0 1.4rem; }

.order-total {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.9rem 1.4rem 0.3rem; font-weight: 600;
}
.order-total span:first-child { font-size: 13px; color: var(--text-muted); }
.order-total-amount { font-family: var(--font-display); font-size: 1.5rem; color: var(--text-heading); font-weight: 300; }
.order-total-note { font-size: 11px; color: var(--text-dim); padding: 0 1.4rem 0.9rem; }

.order-includes { padding: 0.9rem 1.4rem; border-top: 1px solid var(--border); }
.order-includes-title { font-size: 11px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-dim); margin-bottom: 0.6rem; }
.order-includes ul { display: flex; flex-direction: column; gap: 0.38rem; }
.order-includes li { display: flex; align-items: center; gap: 0.45rem; font-size: 12px; color: var(--text-muted); }
.order-includes li span { font-size: 11px; flex-shrink: 0; }

.order-trust { padding: 0.9rem 1.4rem; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 0.6rem; }
.trust-badge { display: flex; align-items: center; gap: 0.5rem; }
.trust-badge svg { flex-shrink: 0; opacity: 0.8; }
.trust-badge span { font-size: 11.5px; color: var(--text-dim); line-height: 1.4; }

/* ── Utility ── */
.hidden { display: none !important; }

/* ═══════════════════════════════════════════════════
   RESPONSIVE
═══════════════════════════════════════════════════ */
@media (max-width: 900px) {
  .checkout-grid { grid-template-columns: 1fr; }
  .checkout-right { position: static; }
  .order-summary { margin-top: 0; }
  /* Show order summary at top on mobile */
  .checkout-right { order: -1; }
}

@media (max-width: 768px) {
  .checkout-header { padding: 0.85rem 1.25rem; }
  .checkout-trust-strip { display: none; }
  .checkout-main { padding: 1.5rem 1.25rem; }
  .checkout-steps { gap: 0; }
  .step-label { display: none; }
  .step-connector { min-width: 12px; margin: 0 0.4rem; }
}

@media (max-width: 480px) {
  .plan-card-inner { padding: 1rem 1.1rem; }
  .plan-price { font-size: 1.4rem; }
  .checkout-section h2 { font-size: 1.7rem; }
  .form-field input { font-size: 16px; } /* prevent iOS zoom */
  .checkout-next-btn, .checkout-pay-btn { font-size: 16px; padding: 1rem; }
  .order-summary-header, .order-product, .order-line-items,
  .order-includes, .order-trust { padding-left: 1.1rem; padding-right: 1.1rem; }
}
