/**
 * Medixly Pricing & Membership Page Styles
 * Sleek, high-contrast, dark mode aesthetic with soundwave neon ambiance
 */

:root {
  --mdx-bg: #0A0A0A;
  --mdx-card-bg: rgba(18, 18, 22, 0.75);
  --mdx-card-hover: rgba(26, 26, 32, 0.95);
  --mdx-card-border: rgba(255, 255, 255, 0.1);
  --mdx-card-highlight-border: #ff2d87;
  --mdx-pink: #ff2d87;
  --mdx-cyan: #00d2ff;
  --mdx-purple: #9b51e0;
  --mdx-gold: #f59e0b;
  --mdx-green: #10b981;
  --mdx-text-main: #ffffff;
  --mdx-text-muted: #9ca3af;
  --mdx-text-subtle: #6b7280;
}

body.medixly-pricing-body {
  background-color: var(--mdx-bg);
  color: var(--mdx-text-main);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  position: relative;
}

/* Background Atmosphere */
.pricing-ambient-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  background: 
    radial-gradient(circle at 80% 15%, rgba(255, 45, 135, 0.16) 0%, transparent 55%),
    radial-gradient(circle at 15% 75%, rgba(0, 210, 255, 0.14) 0%, transparent 60%),
    radial-gradient(circle at 50% 50%, rgba(155, 81, 224, 0.08) 0%, transparent 70%),
    #0A0A0A;
}

.pricing-ambient-mesh {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255, 255, 255, 0.02) 1px, transparent 1px),
                    linear-gradient(90deg, rgba(255, 255, 255, 0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(ellipse at center, rgba(0,0,0,0.8) 0%, transparent 80%);
}

/* Page Layout */
.pricing-page-wrapper {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 100px 20px 80px;
}

/* Urgency Header Bar */
.urgency-top-banner {
  background: linear-gradient(90deg, rgba(255, 45, 135, 0.9), rgba(155, 81, 224, 0.9), rgba(0, 210, 255, 0.9));
  color: #ffffff;
  padding: 12px 20px;
  border-radius: 12px;
  margin-bottom: 40px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  box-shadow: 0 8px 32px rgba(255, 45, 135, 0.25);
  font-weight: 600;
  font-size: 0.95rem;
  backdrop-filter: blur(10px);
}

.urgency-banner-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.urgency-flame-icon {
  font-size: 1.3rem;
  animation: flamePulse 1.5s infinite alternate;
}

@keyframes flamePulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 2px #fff); }
  100% { transform: scale(1.25); filter: drop-shadow(0 0 8px #ffeb3b); }
}

.urgency-banner-right {
  display: flex;
  align-items: center;
  gap: 15px;
  font-size: 0.88rem;
  background: rgba(0, 0, 0, 0.35);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Hero Section */
.pricing-hero {
  text-align: center;
  margin-bottom: 50px;
}

.pricing-brand-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 16px;
  background: rgba(255, 45, 135, 0.12);
  border: 1px solid rgba(255, 45, 135, 0.3);
  border-radius: 30px;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--mdx-pink);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-bottom: 18px;
}

.pricing-hero h1 {
  font-size: clamp(2.3rem, 5.5vw, 3.8rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  margin: 0 0 20px;
  background: linear-gradient(135deg, #ffffff 40%, #00d2ff 80%, #ff2d87 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.pricing-hero-sub {
  font-size: clamp(1.05rem, 2vw, 1.25rem);
  color: var(--mdx-text-muted);
  max-width: 720px;
  margin: 0 auto 35px;
  line-height: 1.6;
}

/* Live Countdown Component */
.live-countdown-container {
  background: var(--mdx-card-bg);
  border: 1px solid var(--mdx-card-border);
  border-radius: 20px;
  padding: 30px;
  max-width: 820px;
  margin: 0 auto 50px;
  backdrop-filter: blur(16px);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.6);
  position: relative;
  overflow: hidden;
}

.live-countdown-container::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--mdx-pink), var(--mdx-purple), var(--mdx-cyan));
}

.countdown-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 25px;
}

.countdown-title {
  font-size: 1.15rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 10px;
}

.pulsing-dot {
  width: 10px;
  height: 10px;
  background-color: var(--mdx-pink);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--mdx-pink);
  animation: pulseDot 1.4s infinite;
}

@keyframes pulseDot {
  0% { transform: scale(0.9); opacity: 0.7; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.9); opacity: 0.7; }
}

.countdown-day-pill {
  background: rgba(255, 45, 135, 0.15);
  color: var(--mdx-pink);
  border: 1px solid rgba(255, 45, 135, 0.35);
  padding: 4px 12px;
  border-radius: 20px;
  font-size: 0.85rem;
  font-weight: 800;
  letter-spacing: 0.5px;
}

/* Digits Clock */
.countdown-clock {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 14px;
  margin-bottom: 25px;
}

.countdown-digit-block {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.countdown-digits {
  background: #141419;
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #ffffff;
  font-size: clamp(2.4rem, 6vw, 3.8rem);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  padding: 12px 18px;
  border-radius: 12px;
  min-width: 80px;
  text-align: center;
  box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.7), 0 4px 16px rgba(0, 0, 0, 0.4);
  position: relative;
}

.countdown-label {
  font-size: 0.75rem;
  color: var(--mdx-text-subtle);
  text-transform: uppercase;
  letter-spacing: 1.5px;
  margin-top: 8px;
  font-weight: 600;
}

.countdown-colon {
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--mdx-pink);
  margin-bottom: 25px;
}

/* Progress bar */
.countdown-progress-track {
  width: 100%;
  height: 8px;
  background: #1a1a24;
  border-radius: 10px;
  overflow: hidden;
  margin-bottom: 15px;
}

.countdown-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, var(--mdx-cyan), var(--mdx-pink));
  border-radius: 10px;
  transition: width 0.5s ease-out;
}

.countdown-info-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  color: var(--mdx-text-muted);
  flex-wrap: wrap;
  gap: 10px;
}

/* Controls / Toggles Section */
.pricing-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  margin-bottom: 50px;
}

.billing-switch-group {
  display: inline-flex;
  background: #16161d;
  border: 1px solid var(--mdx-card-border);
  padding: 5px;
  border-radius: 40px;
  position: relative;
}

.switch-btn {
  background: transparent;
  border: none;
  color: var(--mdx-text-muted);
  font-size: 0.95rem;
  font-weight: 600;
  padding: 10px 24px;
  border-radius: 30px;
  cursor: pointer;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.switch-btn.active {
  background: linear-gradient(135deg, var(--mdx-pink), var(--mdx-purple));
  color: #ffffff;
  box-shadow: 0 4px 16px rgba(255, 45, 135, 0.35);
}

.badge-savings {
  background: #10b981;
  color: #000000;
  font-size: 0.72rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 12px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

/* Mode Switch Group */
.mode-switch-group {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.88rem;
  color: var(--mdx-text-muted);
}

.mode-pill-btn {
  background: transparent;
  border: 1px solid var(--mdx-card-border);
  color: var(--mdx-text-muted);
  font-size: 0.85rem;
  padding: 6px 14px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.mode-pill-btn.active {
  background: rgba(0, 210, 255, 0.15);
  border-color: var(--mdx-cyan);
  color: var(--mdx-cyan);
  font-weight: 700;
}

/* Pricing Grid Cards */
.pricing-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 30px;
  margin-bottom: 70px;
}

@media (min-width: 768px) {
  .pricing-grid {
    grid-template-columns: repeat(3, 1fr);
    align-items: stretch;
  }
}

.pricing-card {
  background: var(--mdx-card-bg);
  border: 1px solid var(--mdx-card-border);
  border-radius: 24px;
  padding: 36px 30px;
  display: flex;
  flex-direction: column;
  position: relative;
  transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
  backdrop-filter: blur(14px);
}

.pricing-card:hover {
  transform: translateY(-6px);
  border-color: rgba(255, 255, 255, 0.25);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.pricing-card.highlight {
  border-color: var(--mdx-pink);
  background: linear-gradient(180deg, rgba(35, 18, 30, 0.8) 0%, rgba(18, 18, 22, 0.95) 100%);
  box-shadow: 0 0 35px rgba(255, 45, 135, 0.22);
}

@media (min-width: 1024px) {
  .pricing-card.highlight {
    transform: scale(1.04);
  }
  .pricing-card.highlight:hover {
    transform: scale(1.06) translateY(-6px);
  }
}

.card-top-badge {
  position: absolute;
  top: -14px;
  left: 50%;
  transform: translateX(-50%);
  background: linear-gradient(90deg, var(--mdx-pink), var(--mdx-purple));
  color: #ffffff;
  font-size: 0.75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  padding: 4px 16px;
  border-radius: 20px;
  box-shadow: 0 4px 12px rgba(255, 45, 135, 0.4);
  white-space: nowrap;
}

.card-header h3 {
  font-size: 1.7rem;
  font-weight: 800;
  margin: 0 0 10px;
}

.card-desc {
  font-size: 0.92rem;
  color: var(--mdx-text-muted);
  min-height: 48px;
  line-height: 1.5;
  margin-bottom: 25px;
}

/* Pricing block inside card */
.card-price-block {
  margin-bottom: 25px;
  border-bottom: 1px solid var(--mdx-card-border);
  padding-bottom: 25px;
}

.price-strike-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
}

.price-original {
  font-size: 1.2rem;
  color: var(--mdx-text-subtle);
  text-decoration: line-through;
}

.discount-tag {
  background: rgba(16, 185, 129, 0.2);
  color: #34d399;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 2px 8px;
  border-radius: 6px;
  border: 1px solid rgba(52, 211, 153, 0.3);
}

.price-main-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
}

.price-amount {
  font-size: 3.2rem;
  font-weight: 900;
  letter-spacing: -1.5px;
  color: #ffffff;
}

.pricing-card.highlight .price-amount {
  background: linear-gradient(135deg, #ffffff 40%, var(--mdx-pink) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.price-period {
  font-size: 1rem;
  color: var(--mdx-text-muted);
  font-weight: 500;
}

.price-tomorrow-notice {
  font-size: 0.8rem;
  color: #f87171;
  font-weight: 600;
  margin-top: 8px;
}

/* Features list */
.card-features {
  list-style: none;
  padding: 0;
  margin: 0 0 35px;
  flex-grow: 1;
}

.card-features li {
  font-size: 0.92rem;
  margin-bottom: 14px;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  line-height: 1.45;
  color: #d1d5db;
}

.card-features li .check-icon {
  color: var(--mdx-cyan);
  font-weight: 900;
  font-size: 1rem;
  line-height: 1.2;
  flex-shrink: 0;
}

.pricing-card.highlight .card-features li .check-icon {
  color: var(--mdx-pink);
}

.card-features li.dimmed {
  color: var(--mdx-text-subtle);
  text-decoration: line-through;
}

/* Call to action buttons */
.btn-tier-cta {
  width: 100%;
  padding: 16px 20px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  border: none;
  text-align: center;
  transition: all 0.25s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  text-decoration: none;
}

.btn-free-standard {
  background: transparent;
  border: 1px solid var(--mdx-card-border);
  color: var(--mdx-text-main);
}
.btn-free-standard:hover {
  background: rgba(255, 255, 255, 0.08);
}

.btn-premium-cta {
  background: linear-gradient(135deg, var(--mdx-pink), #e11d48);
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(255, 45, 135, 0.4);
}
.btn-premium-cta:hover {
  background: linear-gradient(135deg, #ff4d9d, #f43f5e);
  box-shadow: 0 6px 25px rgba(255, 45, 135, 0.6);
  transform: translateY(-2px);
}

.btn-ultra-cta {
  background: linear-gradient(135deg, var(--mdx-purple), var(--mdx-cyan));
  color: #ffffff;
  box-shadow: 0 4px 20px rgba(155, 81, 224, 0.4);
}
.btn-ultra-cta:hover {
  background: linear-gradient(135deg, #ad6aed, #22d3ee);
  box-shadow: 0 6px 25px rgba(0, 210, 255, 0.6);
  transform: translateY(-2px);
}

.btn-disabled {
  background: #374151 !important;
  color: #9ca3af !important;
  cursor: not-allowed !important;
  box-shadow: none !important;
  transform: none !important;
}

/* Guarantee Callout Section */
.guarantee-callout {
  background: rgba(18, 18, 22, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 20px;
  padding: 35px 30px;
  margin-bottom: 70px;
  display: flex;
  align-items: center;
  gap: 25px;
  backdrop-filter: blur(12px);
}

@media (max-width: 640px) {
  .guarantee-callout {
    flex-direction: column;
    text-align: center;
  }
}

.guarantee-icon {
  font-size: 3rem;
  flex-shrink: 0;
}

.guarantee-content h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin: 0 0 8px;
}

.guarantee-content p {
  font-size: 0.95rem;
  color: var(--mdx-text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Comparison Table */
.comparison-section {
  margin-bottom: 80px;
}

.comparison-section h2 {
  font-size: 2.2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 40px;
}

.table-responsive {
  overflow-x: auto;
  border-radius: 16px;
  border: 1px solid var(--mdx-card-border);
  background: var(--mdx-card-bg);
  backdrop-filter: blur(12px);
}

.comparison-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.comparison-table th,
.comparison-table td {
  padding: 18px 24px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.comparison-table th {
  background: rgba(0, 0, 0, 0.4);
  font-size: 1rem;
  font-weight: 700;
  color: #ffffff;
}

.comparison-table td {
  font-size: 0.95rem;
  color: #d1d5db;
}

.comparison-table tr:hover td {
  background: rgba(255, 255, 255, 0.02);
}

/* FAQ Section */
.faq-section {
  max-width: 850px;
  margin: 0 auto 80px;
}

.faq-section h2 {
  font-size: 2.2rem;
  font-weight: 800;
  text-align: center;
  margin-bottom: 40px;
}

.faq-item {
  background: var(--mdx-card-bg);
  border: 1px solid var(--mdx-card-border);
  border-radius: 12px;
  margin-bottom: 15px;
  overflow: hidden;
  transition: all 0.2s ease;
}

.faq-question {
  width: 100%;
  background: transparent;
  border: none;
  padding: 20px 24px;
  text-align: left;
  color: #ffffff;
  font-size: 1.05rem;
  font-weight: 700;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-chevron {
  font-size: 1.2rem;
  transition: transform 0.3s ease;
  color: var(--mdx-pink);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease, padding 0.3s ease;
  padding: 0 24px;
  color: var(--mdx-text-muted);
  font-size: 0.95rem;
  line-height: 1.6;
}

.faq-item.active .faq-answer {
  max-height: 250px;
  padding: 0 24px 20px;
}

.faq-item.active .faq-chevron {
  transform: rotate(180deg);
}

/* User Status Card */
#user-subscription-banner {
  margin-bottom: 40px;
}

.user-active-card {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(0, 210, 255, 0.1));
  border: 1px solid rgba(16, 185, 129, 0.4);
  border-radius: 16px;
  padding: 24px 28px;
  position: relative;
}

.user-active-badge {
  display: inline-block;
  background: #10b981;
  color: #000000;
  font-size: 0.75rem;
  font-weight: 800;
  padding: 3px 10px;
  border-radius: 12px;
  margin-bottom: 12px;
}

.user-active-card h3 {
  margin: 0 0 8px;
  font-size: 1.25rem;
}

.user-active-card p {
  color: var(--mdx-text-muted);
  margin: 0 0 16px;
}

.user-active-actions {
  display: flex;
  gap: 15px;
  flex-wrap: wrap;
}

.btn-primary-glow {
  background: linear-gradient(135deg, var(--mdx-pink), var(--mdx-purple));
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.9rem;
}

.btn-subtle {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid var(--mdx-card-border);
}

/* Toasts and Modals */
.urgency-toast {
  position: fixed;
  bottom: 30px;
  right: 30px;
  background: #141419;
  border: 1px solid var(--mdx-pink);
  color: #ffffff;
  padding: 16px 24px;
  border-radius: 12px;
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.8), 0 0 20px rgba(255, 45, 135, 0.3);
  font-weight: 600;
  font-size: 0.95rem;
  z-index: 1000;
  transform: translateY(120px);
  opacity: 0;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: none;
}

.urgency-toast.show {
  transform: translateY(0);
  opacity: 1;
  pointer-events: auto;
}

.checkout-success-modal {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.checkout-success-modal.show {
  opacity: 1;
  pointer-events: auto;
}

.success-modal-card {
  background: #16161d;
  border: 1px solid var(--mdx-pink);
  box-shadow: 0 0 50px rgba(255, 45, 135, 0.35);
  border-radius: 24px;
  padding: 40px;
  max-width: 500px;
  width: 90%;
  text-align: center;
}

.success-icon-wrap {
  font-size: 4rem;
  margin-bottom: 20px;
}

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

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