/* ============================================================
   WELLERDEVELER CHECKOUT MODAL + INLINE PRICING
   DiscProfile dark premium theme with tier comparison.
   ============================================================ */

/* ---- Overlay ---- */
.wdv-co-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
}

.wdv-co-overlay.wdv-co-open {
  opacity: 1;
  visibility: visible;
}

/* ---- Backdrop ---- */
.wdv-co-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

/* ---- Modal ---- */
.wdv-co-modal {
  position: relative;
  width: 96%;
  max-width: 900px;
  max-height: 92vh;
  overflow-y: auto;
  background: #0f0f1a;
  border: 1px solid rgba(139, 92, 246, 0.15);
  border-radius: 24px;
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.6),
    0 0 0 1px rgba(139, 92, 246, 0.08),
    0 0 120px rgba(139, 92, 246, 0.08),
    0 0 120px rgba(99, 102, 241, 0.06);
  transform: translateY(20px) scale(0.95);
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
  padding: 0;
}

.wdv-co-open .wdv-co-modal {
  transform: translateY(0) scale(1);
}

/* Scrollbar */
.wdv-co-modal::-webkit-scrollbar { width: 6px; }
.wdv-co-modal::-webkit-scrollbar-track { background: transparent; }
.wdv-co-modal::-webkit-scrollbar-thumb { background: rgba(139, 92, 246, 0.2); border-radius: 3px; }

/* ---- Close button ---- */
.wdv-co-close {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 10;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #a1a1aa;
  transition: background 0.2s, color 0.2s, transform 0.15s;
}

.wdv-co-close:hover {
  background: rgba(139, 92, 246, 0.15);
  color: #f4f4f5;
  transform: scale(1.1);
}

/* ---- Header / Brand ---- */
.wdv-co-header {
  padding: 24px 28px 0;
}

.wdv-co-brand {
  display: flex;
  align-items: center;
  gap: 10px;
}

.wdv-co-logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.55rem;
  color: #fff;
  letter-spacing: 0.04em;
}

.wdv-co-brand-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: #a1a1aa;
  letter-spacing: 0.01em;
}

/* ---- Stage: Select ---- */
.wdv-co-stage {
  padding: 20px 28px 28px;
}

.wdv-co-title {
  font-weight: 700;
  font-size: 1.5rem;
  color: #f4f4f5;
  margin-bottom: 4px;
}

.wdv-co-subtitle {
  color: #71717a;
  font-size: 0.95rem;
  margin-bottom: 20px;
}

/* ============================================================
   PRICING COLUMNS (3-col comparison)
   ============================================================ */
.wdv-co-pricing {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}

/* Individual tier card */
.wdv-co-tier {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 2px solid rgba(255, 255, 255, 0.06);
  padding: 20px 16px 16px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wdv-co-tier:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-3px);
}

.wdv-co-tier-selected {
  background: rgba(139, 92, 246, 0.1) !important;
  border-color: #8b5cf6 !important;
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
}

/* Featured (Full Profile) */
.wdv-co-tier-featured {
  background: rgba(139, 92, 246, 0.06);
  border-color: rgba(139, 92, 246, 0.3);
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.1);
  transform: scale(1.02);
}

.wdv-co-tier-featured:hover {
  transform: scale(1.02) translateY(-3px);
}

/* "BEST VALUE" ribbon */
.wdv-co-tier-best {
  position: absolute;
  top: -12px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.65rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 4px 14px;
  border-radius: 999px;
  background: linear-gradient(135deg, #8b5cf6, #a855f7);
  color: #fff;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

/* Tier header */
.wdv-co-tier-head {
  text-align: center;
  margin-bottom: 16px;
  flex: 1;
}

.wdv-co-tier-name {
  font-weight: 700;
  font-size: 1.05rem;
  color: #f4f4f5;
  margin-bottom: 8px;
}

/* Price display */
.wdv-co-tier-price {
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 1px;
  margin-bottom: 4px;
}

.wdv-co-price-dollar {
  font-size: 1.1rem;
  font-weight: 600;
  color: #a1a1aa;
  margin-top: 4px;
}

.wdv-co-price-amount {
  font-size: 2.6rem;
  font-weight: 800;
  color: #f4f4f5;
  line-height: 1;
  letter-spacing: -0.02em;
}

.wdv-co-price-cents {
  font-size: 1.1rem;
  font-weight: 700;
  color: #a1a1aa;
  margin-top: 4px;
}

.wdv-co-price-per {
  font-size: 0.85rem;
  font-weight: 500;
  color: #71717a;
  align-self: flex-end;
  margin-bottom: 6px;
  margin-left: 2px;
}

.wdv-co-tier-period {
  font-size: 0.75rem;
  color: #52525b;
  font-weight: 500;
  margin-bottom: 10px;
}

/* Badges */
.wdv-co-tier-badge {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
}

.wdv-co-badge-pro-free {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(234, 179, 8, 0.15));
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.25);
}

.wdv-co-badge-everything {
  background: rgba(139, 92, 246, 0.15);
  color: #a78bfa;
  border: 1px solid rgba(139, 92, 246, 0.2);
}

/* CTA button inside tier */
.wdv-co-tier-cta {
  width: 100%;
  padding: 12px 16px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #f4f4f5;
  font-weight: 700;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  margin-top: auto;
}

.wdv-co-tier-cta:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: rgba(139, 92, 246, 0.4);
  transform: translateY(-1px);
}

.wdv-co-tier-cta-featured {
  background: linear-gradient(135deg, #8b5cf6, #6366f1);
  border: none;
  box-shadow: 0 4px 16px rgba(139, 92, 246, 0.3);
}

.wdv-co-tier-cta-featured:hover {
  background: linear-gradient(135deg, #9b6cf6, #7376f1);
  box-shadow: 0 6px 24px rgba(139, 92, 246, 0.45);
  transform: translateY(-2px);
}

/* ============================================================
   FEATURE COMPARISON TABLE
   ============================================================ */
.wdv-co-features {
  margin-bottom: 16px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.wdv-co-feat-header {
  display: grid;
  grid-template-columns: 1fr 70px 70px 70px;
  gap: 0;
  padding: 10px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.wdv-co-feat-header .wdv-co-feat-name {
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #71717a;
}

.wdv-co-feat-header .wdv-co-feat-cell {
  font-weight: 700;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #a1a1aa;
  text-align: center;
}

.wdv-co-feat-row {
  display: grid;
  grid-template-columns: 1fr 70px 70px 70px;
  gap: 0;
  padding: 8px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.02);
  transition: background 0.15s;
}

.wdv-co-feat-row:hover {
  background: rgba(255, 255, 255, 0.02);
}

.wdv-co-feat-row:last-child {
  border-bottom: none;
}

.wdv-co-feat-name {
  font-size: 0.82rem;
  color: #a1a1aa;
  font-weight: 500;
  display: flex;
  align-items: center;
}

.wdv-co-feat-cell {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Check and dash icons */
.wdv-co-check {
  color: #22c55e;
}

.wdv-co-dash {
  color: #3f3f46;
}

/* ============================================================
   PROMO CODE
   ============================================================ */
.wdv-co-promo {
  margin-bottom: 16px;
}

.wdv-co-promo-details {
  border-radius: 12px;
}

.wdv-co-promo-toggle {
  font-size: 0.82rem;
  color: #71717a;
  cursor: pointer;
  font-weight: 500;
  padding: 6px 0;
  list-style: none;
  transition: color 0.2s;
}

.wdv-co-promo-toggle::-webkit-details-marker { display: none; }
.wdv-co-promo-toggle::marker { display: none; content: ''; }

.wdv-co-promo-toggle::before {
  content: '+ ';
  color: #8b5cf6;
  font-weight: 700;
}

.wdv-co-promo-details[open] .wdv-co-promo-toggle::before {
  content: '- ';
}

.wdv-co-promo-toggle:hover {
  color: #a1a1aa;
}

.wdv-co-promo-inner {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.wdv-co-promo-input {
  flex: 1;
  padding: 10px 14px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: #f4f4f5;
  font-size: 0.85rem;
  font-family: 'JetBrains Mono', monospace;
  transition: border-color 0.2s;
}

.wdv-co-promo-input:focus {
  outline: none;
  border-color: #8b5cf6;
}

.wdv-co-promo-btn {
  padding: 10px 18px;
  border-radius: 10px;
  background: rgba(139, 92, 246, 0.15);
  border: 1px solid rgba(139, 92, 246, 0.3);
  color: #a78bfa;
  font-weight: 600;
  font-size: 0.82rem;
  cursor: pointer;
  transition: all 0.2s;
}

.wdv-co-promo-btn:hover {
  background: rgba(139, 92, 246, 0.25);
  color: #c4b5fd;
}

/* ---- Trust badges ---- */
.wdv-co-trust {
  display: flex;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
}

.wdv-co-trust-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.75rem;
  font-weight: 500;
  color: #52525b;
  letter-spacing: 0.02em;
}

.wdv-co-trust-item svg {
  opacity: 0.6;
}

/* ---- Stage: Payment ---- */
.wdv-co-stage-pay {
  min-height: 400px;
}

.wdv-co-back {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: none;
  border: none;
  color: #71717a;
  font-size: 0.85rem;
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  margin-bottom: 12px;
  transition: color 0.2s;
}

.wdv-co-back:hover {
  color: #f4f4f5;
}

.wdv-co-stripe-mount {
  min-height: 300px;
}

/* ---- Loading spinner ---- */
.wdv-co-loading {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 60px 0;
  color: #71717a;
  font-size: 0.9rem;
}

.wdv-co-spinner {
  width: 32px;
  height: 32px;
  border: 3px solid rgba(255, 255, 255, 0.08);
  border-top-color: #8b5cf6;
  border-radius: 50%;
  animation: wdvSpin 0.8s linear infinite;
}

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

/* ---- Stage: Success ---- */
.wdv-co-stage-success {
  text-align: center;
  padding: 48px 28px;
}

.wdv-co-success-icon {
  font-size: 3.5rem;
  margin-bottom: 16px;
  animation: wdvBounceIn 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes wdvBounceIn {
  from { transform: scale(0); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}

.wdv-co-success-detail {
  color: #a1a1aa;
  font-size: 0.9rem;
  margin-top: 8px;
  margin-bottom: 24px;
}

.wdv-co-done-btn {
  padding: 14px 32px;
  border-radius: 14px;
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  border: none;
  cursor: pointer;
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.2s;
  box-shadow: 0 4px 20px rgba(34, 197, 94, 0.3);
}

.wdv-co-done-btn:hover {
  transform: translateY(-2px) scale(1.03);
  box-shadow: 0 8px 30px rgba(34, 197, 94, 0.4);
}

/* ---- Stage: Error ---- */
.wdv-co-stage-error {
  text-align: center;
  padding: 48px 28px;
}

.wdv-co-error-icon {
  font-size: 3rem;
  margin-bottom: 16px;
}

/* ============================================================
   INLINE PRICING (for full-assessment gate page)
   ============================================================ */
.wdv-co-pricing-inline {
  max-width: 960px;
  margin: 0 auto;
}

/* Feature list inside inline tier cards */
.wdv-co-tier-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px 0;
  flex: 1;
}

.wdv-co-tier-list li {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.82rem;
  padding: 5px 0;
  line-height: 1.4;
}

.wdv-co-tier-li-yes {
  color: #d4d4d8;
}

.wdv-co-tier-li-no {
  color: #3f3f46;
}

.wdv-co-tier-li-yes .wdv-co-check {
  flex-shrink: 0;
}

.wdv-co-tier-li-no .wdv-co-dash {
  flex-shrink: 0;
}

/* ============================================================
   MOBILE RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .wdv-co-modal {
    width: 100%;
    max-width: 100%;
    max-height: 100vh;
    border-radius: 20px 20px 0 0;
    position: fixed;
    bottom: 0;
    transform: translateY(100%);
  }

  .wdv-co-open .wdv-co-modal {
    transform: translateY(0);
  }

  /* Stack pricing cards, Full Profile first */
  .wdv-co-pricing {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .wdv-co-tier-featured {
    order: -1;
    transform: none;
  }

  .wdv-co-tier-featured:hover {
    transform: translateY(-3px);
  }

  .wdv-co-tier {
    padding: 16px 14px 14px;
  }

  .wdv-co-price-amount {
    font-size: 2.2rem;
  }

  /* Feature comparison table: narrower cells */
  .wdv-co-feat-header,
  .wdv-co-feat-row {
    grid-template-columns: 1fr 52px 52px 52px;
    padding: 8px 12px;
  }

  .wdv-co-feat-name {
    font-size: 0.75rem;
  }

  .wdv-co-stage {
    padding: 16px 20px 24px;
  }

  .wdv-co-header {
    padding: 20px 20px 0;
  }
}

/* Inline pricing on the gate page: also stacks on mobile */
@media (max-width: 768px) {
  .wdv-co-pricing-inline {
    grid-template-columns: 1fr;
  }

  .wdv-co-pricing-inline .wdv-co-tier-featured {
    order: -1;
  }
}
