﻿/* Subscription & Checkout Styling for Social Studying AI */

.sub-page {
  background: #f8fafc;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.sub-header {
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid #e2e8f0;
  padding: 16px 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 50;
}

.sub-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: #0f172a;
  font-weight: 700;
  font-size: 1.15rem;
}

.sub-brand img {
  height: 38px;
  width: auto;
}

.sub-header-link {
  font-size: 0.9rem;
  font-weight: 600;
  color: #4f46e5;
  text-decoration: none;
  padding: 8px 16px;
  border-radius: 8px;
  background: #eef2ff;
  transition: all 0.2s ease;
}

.sub-header-link:hover {
  background: #e0e7ff;
}

.sub-main {
  flex: 1;
  max-width: 920px;
  width: 100%;
  margin: 36px auto;
  padding: 0 20px;
}

.sub-hero-card {
  background: linear-gradient(135deg, #1e1b4b 0%, #312e81 60%, #4338ca 100%);
  color: #ffffff;
  padding: 36px 32px;
  border-radius: 20px;
  margin-bottom: 28px;
  box-shadow: 0 10px 30px rgba(49, 46, 129, 0.2);
  text-align: center;
  position: relative;
  overflow: hidden;
}

.sub-hero-card::before {
  content: "";
  position: absolute;
  top: -40%;
  right: -20%;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(99, 102, 241, 0.35) 0%, rgba(99, 102, 241, 0) 70%);
}

.sub-badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  color: #c7d2fe;
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 12px;
}

.sub-hero-card h1 {
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
  font-weight: 800;
  margin: 0 0 12px 0;
  letter-spacing: -0.02em;
}

.sub-hero-card p {
  color: #c7d2fe;
  font-size: 1.05rem;
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}

/* Steps Indicator */
.steps-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-bottom: 32px;
}

.step-item {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #94a3b8;
  font-size: 0.88rem;
  font-weight: 600;
}

.step-item.active {
  color: #4f46e5;
}

.step-item.completed {
  color: #10b981;
}

.step-dot {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #e2e8f0;
  color: #64748b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.82rem;
  font-weight: 700;
}

.step-item.active .step-dot {
  background: #4f46e5;
  color: #ffffff;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.2);
}

.step-item.completed .step-dot {
  background: #10b981;
  color: #ffffff;
}

.step-line {
  width: 40px;
  height: 2px;
  background: #e2e8f0;
}

.step-item.completed + .step-line,
.step-item.active + .step-line {
  background: #c7d2fe;
}

/* Form Container */
.sub-form-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 20px;
  padding: 36px 32px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.04);
}

.form-section-title {
  font-size: 1.25rem;
  font-weight: 750;
  color: #0f172a;
  margin: 0 0 20px 0;
  display: flex;
  align-items: center;
  gap: 10px;
}

.form-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}

@media (max-width: 640px) {
  .form-grid-2 {
    grid-template-columns: 1fr;
    gap: 16px;
  }
}

.field-group {
  margin-bottom: 20px;
}

.field-group label {
  display: block;
  font-size: 0.88rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 8px;
}

.field-group label span.req {
  color: #ef4444;
}

.field-input-wrap {
  position: relative;
}

.field-input {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid #cbd5e1;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: inherit;
  color: #0f172a;
  background: #ffffff;
  transition: all 0.2s ease;
  box-sizing: border-box;
}

.field-input:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.field-input.is-verified {
  border-color: #10b981;
  background: #f0fdf4;
  padding-right: 42px;
}

.verified-icon {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: #10b981;
  font-weight: 700;
  font-size: 1.1rem;
}

.field-helper {
  font-size: 0.8rem;
  color: #64748b;
  margin-top: 6px;
}

/* Plan Selector Cards */
.plans-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 24px 0 32px 0;
}

.plan-card {
  border: 2px solid #e2e8f0;
  border-radius: 16px;
  padding: 24px 20px;
  cursor: pointer;
  position: relative;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  background: #ffffff;
}

.plan-card:hover {
  border-color: #cbd5e1;
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.05);
}

.plan-card.is-selected {
  border-color: #4f46e5;
  background: #fafafa;
  box-shadow: 0 10px 30px rgba(79, 70, 229, 0.12);
}

.plan-badge {
  position: absolute;
  top: -12px;
  right: 18px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  padding: 4px 12px;
  border-radius: 9999px;
  font-size: 0.72rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3);
}

.plan-radio {
  position: absolute;
  top: 20px;
  right: 18px;
  accent-color: #4f46e5;
  width: 20px;
  height: 20px;
  margin: 0;
}

.plan-title {
  font-size: 1.15rem;
  font-weight: 750;
  color: #0f172a;
  margin: 0 0 6px 0;
}

.plan-price {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin: 12px 0 16px 0;
}

.plan-price-amount {
  font-size: 2rem;
  font-weight: 850;
  color: #0f172a;
}

.plan-price-cycle {
  font-size: 0.88rem;
  color: #64748b;
  font-weight: 600;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: 0;
  border-top: 1px solid #f1f5f9;
  padding-top: 16px;
}

.plan-features li {
  font-size: 0.85rem;
  color: #475569;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.plan-features li::before {
  content: "✓";
  color: #10b981;
  font-weight: 800;
}

/* Action Buttons */
.btn-cta-primary {
  width: 100%;
  padding: 16px 28px;
  border-radius: 12px;
  background: linear-gradient(135deg, #4f46e5 0%, #4338ca 100%);
  color: #ffffff;
  border: none;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 6px 20px rgba(79, 70, 229, 0.35);
  transition: all 0.2s ease;
}

.btn-cta-primary:hover:not(:disabled) {
  background: linear-gradient(135deg, #4338ca 0%, #3730a3 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 25px rgba(79, 70, 229, 0.45);
}

.btn-cta-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.security-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 20px;
  color: #64748b;
  font-size: 0.82rem;
}

.security-footer span {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Modal for OTP */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(6px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transition: all 0.25s ease;
}

.modal-overlay.is-open {
  opacity: 1;
  visibility: visible;
}

.modal-box {
  background: #ffffff;
  border-radius: 20px;
  max-width: 480px;
  width: 100%;
  padding: 32px 28px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.2);
  text-align: center;
  transform: scale(0.95);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-overlay.is-open .modal-box {
  transform: scale(1);
}

.modal-icon-circle {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: #eef2ff;
  color: #4f46e5;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 18px auto;
  font-size: 1.7rem;
}

.modal-title {
  font-size: 1.35rem;
  font-weight: 800;
  color: #0f172a;
  margin: 0 0 8px 0;
}

.modal-subtitle {
  font-size: 0.92rem;
  color: #64748b;
  line-height: 1.5;
  margin: 0 0 24px 0;
}

.otp-inputs-wrap {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 20px;
}

.otp-digit {
  width: 48px;
  height: 56px;
  border: 2px solid #cbd5e1;
  border-radius: 12px;
  font-size: 1.6rem;
  font-weight: 800;
  text-align: center;
  color: #0f172a;
  transition: all 0.2s ease;
}

.otp-digit:focus {
  outline: none;
  border-color: #4f46e5;
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.15);
}

.otp-timer {
  font-size: 0.85rem;
  color: #64748b;
  margin-bottom: 20px;
}

.otp-resend-btn {
  background: none;
  border: none;
  color: #4f46e5;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  padding: 4px;
}

.otp-resend-btn:disabled {
  color: #94a3b8;
  cursor: not-allowed;
}

.alert-box {
  padding: 12px 16px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 20px;
  display: none;
}

.alert-box.is-error {
  display: block;
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
}

.alert-box.is-success {
  display: block;
  background: #f0fdf4;
  border: 1px solid #bbf7d0;
  color: #166534;
}

/* Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  border-top-color: #ffffff;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Success Confirmation Hero */
.success-card {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 24px;
  padding: 48px 36px;
  text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.05);
  max-width: 640px;
  margin: 40px auto;
}

.success-icon-wrap {
  width: 84px;
  height: 84px;
  border-radius: 50%;
  background: #dcfce7;
  color: #15803d;
  font-size: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 24px auto;
  box-shadow: 0 10px 25px rgba(21, 128, 61, 0.2);
}

.success-card h1 {
  font-size: 2rem;
  font-weight: 850;
  color: #0f172a;
  margin: 0 0 12px 0;
}

.success-card p {
  color: #64748b;
  font-size: 1.05rem;
  line-height: 1.6;
  margin: 0 0 28px 0;
}

.success-details {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 16px;
  padding: 20px;
  text-align: left;
  margin-bottom: 28px;
}

.detail-row {
  display: flex;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid #edf2f7;
  font-size: 0.9rem;
}

.detail-row:last-child {
  border-bottom: none;
}

.detail-label {
  color: #64748b;
  font-weight: 500;
}

.detail-val {
  color: #0f172a;
  font-weight: 700;
}


/* ============================================================
   Tester Onboarding: Temporarily Put Hold on Pricing and Hide Payment UI
   (Preserving all underlying form fields and models intact)
   ============================================================ */
.plans-grid,
#step-nav-3,
.security-footer,
.plan-section-header,
.student-plan-highlight,
.student-price-tag,
.step-line:last-of-type {
  display: none !important;
}

.plans-grid,
#step-nav-3,
.steps-nav .step-line:last-of-type,
.security-footer,
.plan-section-header,
.student-plan-highlight,
.student-price-tag {
  display: none !important;
}
