/**
 * website-design-v2.css — optional add-on for /website-design "Your Choice"
 * pricing grid + thank-you onboarding form polish.
 * Load AFTER pages-fix.css. Safe: scoped selectors only.
 *
 * Midnight theme for /website-design still comes from pages-fix.css
 * via body:has(.purchase-button). Do not remove .purchase-button links.
 */

/* ---------- Your Choice (website-design) ---------- */
body:has(.purchase-button) .choice-section {
  background: linear-gradient(180deg, #0c1b30 0%, #0a1628 100%);
  padding: 72px 0 64px;
  border-top: 1px solid rgba(56, 189, 248, 0.1);
}

body:has(.purchase-button) .choice-section .section-title {
  color: #f8fafc;
  text-align: center;
  margin-bottom: 0.75rem;
}

body:has(.purchase-button) .choice-intro {
  color: #94a3b8;
  text-align: center;
  max-width: 40rem;
  margin: 0 auto 2rem;
  font-size: 1.05rem;
  line-height: 1.65;
}

body:has(.purchase-button) .choice-subtitle {
  color: #38bdf8;
  text-align: center;
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin: 2rem 0 1.25rem;
}

body:has(.purchase-button) .choice-subtitle--onetime {
  margin-top: 2.75rem;
}

body:has(.purchase-button) .choice-grid {
  display: grid;
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

body:has(.purchase-button) .choice-grid--monthly {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

body:has(.purchase-button) .choice-grid--onetime {
  grid-template-columns: minmax(0, 420px);
  justify-content: center;
}

body:has(.purchase-button) .choice-card {
  position: relative;
  background: linear-gradient(180deg, #132238 0%, #0f1c30 100%);
  border: 1px solid rgba(56, 189, 248, 0.14);
  border-radius: 14px;
  padding: 1.5rem 1.35rem 1.35rem;
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
  display: flex;
  flex-direction: column;
  max-width: 100%;
}

body:has(.purchase-button) .choice-card--featured {
  border-color: rgba(56, 189, 248, 0.45);
  box-shadow: 0 16px 36px rgba(14, 165, 233, 0.18), 0 12px 28px rgba(0, 0, 0, 0.28);
}

body:has(.purchase-button) .choice-badge {
  position: absolute;
  top: -0.65rem;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(135deg, #2563eb 0%, #0ea5e9 100%);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  white-space: nowrap;
}

body:has(.purchase-button) .choice-name {
  color: #f1f5f9;
  font-size: 1.25rem;
  margin: 0.35rem 0 0.75rem;
  text-align: center;
}

body:has(.purchase-button) .choice-price {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: 0.35rem 0.5rem;
  margin-bottom: 1.15rem;
}

body:has(.purchase-button) .choice-amount {
  color: #38bdf8;
  font-size: clamp(1.85rem, 3vw, 2.35rem);
  font-weight: 700;
}

body:has(.purchase-button) .choice-period {
  color: #94a3b8;
  font-size: 0.95rem;
}

body:has(.purchase-button) .choice-features {
  list-style: none;
  margin: 0 0 1.35rem;
  padding: 0;
  flex: 1;
}

body:has(.purchase-button) .choice-features li {
  color: #cbd5e1;
  font-size: 0.95rem;
  line-height: 1.45;
  padding: 0.45rem 0 0.45rem 1.35rem;
  position: relative;
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}

body:has(.purchase-button) .choice-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: #38bdf8;
  font-weight: 700;
}

body:has(.purchase-button) .choice-cta {
  width: 100%;
  text-align: center;
  box-sizing: border-box;
  font-size: 0.95rem !important;
  padding: 0.85rem 1rem !important;
}

body:has(.purchase-button) .choice-placeholder-note {
  margin: 0.65rem 0 0;
  text-align: center;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fbbf24;
}

body:has(.purchase-button) .choice-secure-note {
  text-align: center;
  color: #64748b;
  font-size: 0.9rem;
  margin: 1.75rem 0 0;
}

@media (max-width: 900px) {
  body:has(.purchase-button) .choice-grid--monthly {
    grid-template-columns: 1fr;
    max-width: 420px;
  }
  body:has(.purchase-button) .choice-section {
    padding: 48px 0;
  }
}

/* ---------- Thank-you onboarding form (light) ---------- */
body:has(.thank-you-main) .ty-lead {
  text-align: center;
  color: #475569;
  max-width: 36rem;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

body:has(.thank-you-main) .ty-onboard-form {
  max-width: 520px;
  margin: 0 auto 2rem;
  padding: 2rem 1.75rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.08);
}

body:has(.thank-you-main) .ty-onboard-form h3 {
  margin: 0 0 0.35rem;
  font-size: 1.55rem;
  color: #0f172a;
  text-align: center;
}

body:has(.thank-you-main) .ty-onboard-form .subhead {
  margin: 0 0 1.5rem;
  text-align: center;
  color: #64748b;
  font-size: 0.98rem;
  line-height: 1.45;
}

body:has(.thank-you-main) .ty-onboard-form .form-group {
  margin-bottom: 1rem;
}

body:has(.thank-you-main) .ty-onboard-form label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

body:has(.thank-you-main) .ty-onboard-form .optional-tag {
  font-weight: 500;
  color: #94a3b8;
}

body:has(.thank-you-main) .ty-onboard-form input,
body:has(.thank-you-main) .ty-onboard-form select {
  width: 100%;
  padding: 0.8rem 1rem;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  font-size: 1rem;
  color: #0f172a;
  box-sizing: border-box;
}

body:has(.thank-you-main) .ty-onboard-form input:focus,
body:has(.thank-you-main) .ty-onboard-form select:focus {
  outline: none;
  border-color: #2563eb;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

body:has(.thank-you-main) .ty-onboard-form .hp-field {
  position: absolute;
  left: -9999px;
  height: 0;
  overflow: hidden;
}

body:has(.thank-you-main) .ty-onboard-form .btn-submit {
  width: 100%;
  margin-top: 0.5rem;
  padding: 0.95rem 1.25rem;
  border: none;
  border-radius: 999px;
  background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.28);
}

body:has(.thank-you-main) .ty-onboard-form .btn-submit:disabled {
  opacity: 0.7;
  cursor: wait;
}

body:has(.thank-you-main) .ty-onboard-form .form-error {
  display: none;
  margin: 0.75rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 0.9rem;
}

body:has(.thank-you-main) .ty-onboard-form .form-success {
  display: none;
  text-align: center;
  padding: 1.5rem 0;
}

body:has(.thank-you-main) .ty-onboard-form .form-success .checkmark {
  font-size: 3rem;
  display: block;
  margin-bottom: 0.35rem;
}

body:has(.thank-you-main) .ty-onboard-form .form-success h4 {
  margin: 0.35rem 0;
  color: #0f172a;
  font-size: 1.4rem;
}

body:has(.thank-you-main) .ty-onboard-form .form-success p {
  color: #475569;
  margin: 0.35rem 0 0;
}

body:has(.thank-you-main) .ty-plan-note .support-title {
  color: #0f172a;
}

body:has(.thank-you-main) .ty-plan-note p {
  color: #475569;
  line-height: 1.6;
}

@media (max-width: 480px) {
  body:has(.thank-you-main) .ty-onboard-form {
    padding: 1.5rem 1.15rem;
    margin: 0 0.5rem 1.5rem;
  }
}

/* ---------- Stripe Embedded Checkout overlay ---------- */
body.stripe-checkout-open {
  overflow: hidden;
}

.stripe-checkout-overlay {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  background: rgba(2, 8, 20, 0.72);
  backdrop-filter: blur(4px);
  box-sizing: border-box;
}

.stripe-checkout-overlay[hidden] {
  display: none !important;
}

.stripe-checkout-dialog {
  position: relative;
  width: min(100%, 520px);
  max-height: min(92vh, 900px);
  overflow: auto;
  background: #0f1c30;
  border: 1px solid rgba(56, 189, 248, 0.28);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
  padding: 1rem 1rem 1.25rem;
}

.stripe-checkout-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
  padding: 0 0.25rem;
}

.stripe-checkout-title {
  margin: 0;
  color: #f1f5f9;
  font-size: 1.1rem;
  font-weight: 600;
}

.stripe-checkout-close {
  appearance: none;
  border: none;
  background: transparent;
  color: #94a3b8;
  font-size: 1.75rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.15rem 0.4rem;
  border-radius: 8px;
}

.stripe-checkout-close:hover,
.stripe-checkout-close:focus {
  color: #f8fafc;
  background: rgba(148, 163, 184, 0.15);
  outline: none;
}

.stripe-checkout-mount {
  min-height: 120px;
}

.stripe-checkout-loading {
  margin: 1.5rem 0;
  text-align: center;
  color: #94a3b8;
  font-size: 0.95rem;
}

.stripe-checkout-loading[hidden] {
  display: none !important;
}

.stripe-checkout-error {
  margin: 0.75rem 0 0;
  padding: 0.85rem 1rem;
  border-radius: 10px;
  background: rgba(185, 28, 28, 0.18);
  border: 1px solid rgba(248, 113, 113, 0.35);
  color: #fecaca;
  font-size: 0.9rem;
  line-height: 1.45;
}

.stripe-checkout-error[hidden] {
  display: none !important;
}

@media (max-width: 480px) {
  .stripe-checkout-dialog {
    width: 100%;
    max-height: 96vh;
    padding: 0.75rem;
    border-radius: 12px;
  }
}
