/*
=====================================================
  /public/css/pages/pricing.css
  - Widened container for better table layout
=====================================================
*/

/* 1. Page Globals & Layout
----------------------------------------------------- */
.pricing-page {
  background-color: var(--color-slate-50);
}

/* Page-container override: pricing needs 1280px for the comparison table */
.pricing-page .page-container {
  max-width: 1280px;
}

/* [MIGRATED] max-width/padding now handled by .page-container */
/* #pricing-container .container {
  max-width: 1280px;
  margin: 0 auto;
  padding: var(--space-4) var(--space-5) 0;
} */

/* 
   Full bleed sections adjust to the wider container
*/
.full-bleed-section {
  position: relative;
  background-color: inherit;
  z-index: 1;
}

/* Desktop: Standard negative margins */
@media (min-width: 768px) {
  .full-bleed-section {
    width: auto;
    margin-left: calc(-1 * var(--space-6));
    margin-right: calc(-1 * var(--space-6));
    padding-left: var(--space-6);
    padding-right: var(--space-6);
  }
}

@media (min-width: 992px) {
  .full-bleed-section {
    margin-left: calc(-1 * var(--space-8));
    margin-right: calc(-1 * var(--space-8));
    padding-left: var(--space-8);
    padding-right: var(--space-8);
  }
}

/* Mobile: Viewport Breakout (Guarantees full width regardless of parent padding) */
@media (max-width: 767px) {
  .full-bleed-section {
    width: 100vw;
    margin-left: 50%;
    transform: translateX(-50%);
    padding-left: var(--space-4);
    padding-right: var(--space-4);
  }
}
/*
=====================================================
  LAYOUT OVERRIDE FOR PRICING TABLE CONTAINER
=====================================================
*/
/* [MIGRATED] max-width now handled by .pricing-page .page-container above */
/* .home-page #pricing .container,
.pricing-page #pricing-container .container {
    max-width: 1280px;
} */

/* 2. Section Headers & Spacing
----------------------------------------------------- */
.pricing-page .page-header {
  padding-bottom: var(--space-10);
}
/* Reduce gap between hero card and pricing table */
.pricing-page .page-header--sales {
  margin-bottom: var(--space-1);
}

.success-pathways-wrapper,
.testimonials-wrapper {
  padding: var(--space-20) 0;
}

.pricing-section {
  padding: var(--space-20) 0 0;
}

/* 3. Billing Toggle — REMOVED from page (moved to payment modal)
   Styles kept minimal for backwards compatibility if toggle is re-added.
----------------------------------------------------- */

/* 4. Trust & Guarantee Section
----------------------------------------------------- */
.trust-stack {
  padding: var(--space-12) 0;
  text-align: center;
}
.guarantee-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) var(--space-4);
  background: var(--color-slate-100);
  border: 1px solid var(--color-slate-200);
  border-radius: var(--radius-full);
  color: var(--color-slate-700);
  font-weight: var(--font-weight-semibold);
  margin-bottom: var(--space-6);
}
.guarantee-badge i { color: var(--color-brand-green); }

.payment-logos-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    margin-bottom: var(--space-6);
}

.currency-disclaimer {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    font-size: var(--font-size-sm);
    color: var(--color-slate-500);
    background: var(--color-slate-100);
    padding: 4px 12px;
    border-radius: var(--radius-md);
    margin-bottom: var(--space-4);
}

/* 5. Social Proof Bar
----------------------------------------------------- */
.pricing-social-proof {
  display: flex;
  justify-content: center;
  gap: var(--space-6);
  flex-wrap: wrap;
  padding: 0 var(--space-4) var(--space-4);
  text-align: center;
  max-width: 600px;
  margin: 0 auto;
}
.pricing-social-proof__stat {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--font-size-sm);
  color: var(--color-gray-500);
  font-weight: var(--font-weight-medium);
}
.pricing-social-proof__stat strong {
  color: var(--color-gray-900);
  font-weight: var(--font-weight-bold);
}
.pricing-social-proof__stat i {
  color: var(--color-primary);
  font-size: var(--font-size-sm);
}

/* 6. Inline Objection Handlers
----------------------------------------------------- */
.pricing-objection-row {
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
  padding: var(--space-8) 0 var(--space-4);
  max-width: 560px;
  margin: 0 auto;
}
.pricing-objection-row__item {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  font-size: var(--font-size-sm);
  color: var(--color-gray-600);
  line-height: 1.5;
}
.pricing-objection-row__item i {
  color: var(--color-success);
  margin-top: 3px;
  flex-shrink: 0;
  font-size: 1rem;
}
.pricing-objection-row__item strong {
  color: var(--color-gray-900);
  font-weight: var(--font-weight-semibold);
}

/* 7. Free Tier Subtle Note
----------------------------------------------------- */
.pricing-free-note {
  text-align: center;
  padding: var(--space-4) var(--space-4);
  color: var(--color-gray-500);
  font-size: var(--font-size-sm);
}
.pricing-free-note p {
  margin: 0;
}
.pricing-free-note a {
  color: var(--color-primary);
  font-weight: var(--font-weight-semibold);
}

/* 8. Current Plan Label (non-clickable, plain text)
----------------------------------------------------- */
.current-plan-label {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: var(--color-success);
  font-weight: var(--font-weight-semibold);
  font-size: var(--font-size-sm);
  padding: var(--space-2) 0;
  cursor: default;
}
.current-plan-label i {
  font-size: 1rem;
}

/* Tooltips */
.pricing-tip-icon {
  font-size: var(--font-size-sm);
  color: var(--color-slate-400);
  cursor: help;
  margin-left: 2px;
}
.pricing-tip-icon:hover { color: var(--color-primary); }

.pricing-tip {
  position: fixed; width: 280px; max-width: calc(100vw - 16px);
  background: var(--color-slate-800); color: var(--color-slate-100);
  border-radius: var(--radius-lg); padding: var(--space-3) var(--space-4);
  font-size: var(--font-size-sm); line-height: 1.5; box-shadow: var(--shadow-xl);
  z-index: 2000; pointer-events: none;
  opacity: 0; transition: opacity 0.2s ease-out, transform 0.2s ease-out;
  transform: translateY(-10px);
}
.pricing-tip.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }
.pricing-tip::after {
  content: ""; position: absolute; left: 50%; top: 100%; transform: translateX(-50%);
  border: 6px solid transparent; border-top-color: var(--color-slate-800);
}

/* Responsive */
@media (max-width: 767px) {
  .pricing-page .page-header { padding: var(--space-12) 0 var(--space-6); }
  .pricing-social-proof {
    gap: var(--space-3);
    padding: 0 var(--space-4) var(--space-2);
  }
  .pricing-social-proof__stat {
    font-size: var(--font-size-xs);
  }
}

@media (min-width: 992px) {
  .pricing-objection-row {
    flex-direction: row;
    max-width: 900px;
    text-align: center;
    justify-content: center;
  }
  .pricing-objection-row__item {
    flex-direction: column;
    align-items: center;
    text-align: center;
    flex: 1;
  }
  .pricing-objection-row__item i {
    margin-top: 0;
    font-size: 1.25rem;
    margin-bottom: var(--space-2);
  }
}

/* =================================================================
   Pricing Table Footer & Border Polish (Corrected V4)
   ================================================================= */

/* 1. Wrapper Fix: Enforces rounded corners on the whole table */
.feature-table-responsive-wrapper {
  border-radius: var(--radius-xl);
  overflow: visible; /* Allows Pro shadow to pop out */
  border: none;
  background-color: transparent;
}

/* 2. The Table itself */
.feature-comparison-table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-xl);
  background-color: var(--color-white);
  border-style: hidden; /* Hide standard border to avoid conflicts with cell borders */
  box-shadow: 0 0 0 1px var(--color-gray-200); /* Fake border that plays nice with radius */
  border-radius: var(--radius-xl);
}

/* 3. Footer Cell Base Styles */
.feature-comparison-table tfoot td {
  background-color: var(--color-white);
  padding: var(--space-5) var(--space-3);
  
  /* Standard Gray Grid Borders */
  border-top: 1px solid var(--color-gray-200);
  border-right: 1px solid var(--color-gray-200);
  
  text-align: center;
  vertical-align: middle;
}

.feature-comparison-table tfoot td:last-child {
  border-right: none;
}

/* 4. THE PRO PLAN FIX (Purple Outer, Grey Top) */

/* 4a. Reset the Body Last Row (Standard Grid) */
/* We ensure the row ABOVE the footer just has normal borders */
.feature-comparison-table tbody tr:last-child td.is-recommended {
  border-left: 2px solid var(--color-primary-dark);
  border-right: 2px solid var(--color-primary-dark);
  background-color: #f8f9ff;
  /* Important: We allow the standard border-bottom to exist here */
}

/* 4b. Style the FOOTER CELL for Pro */
.feature-comparison-table tfoot td.is-recommended {
  background-color: #f8f9ff;

  /* Darker Indigo Border on Sides and Bottom (The "Card" look) */
  border-left: 2px solid var(--color-primary-dark);
  border-right: 2px solid var(--color-primary-dark);
  border-bottom: 2px solid var(--color-primary-dark);

  /* RESTORE STANDARD GREY TOP BORDER */
  /* This connects the grid line perfectly across the row */
  border-top: 1px solid var(--color-gray-200);

  /* Rounded bottom corners for this specific "card" */
  border-bottom-left-radius: var(--radius-lg);
  border-bottom-right-radius: var(--radius-lg);

  /* Pop out effects */
  position: relative;
  z-index: 20;
  box-shadow: 0 10px 15px -3px rgba(67, 56, 202, 0.12);
}

/* 5. Outer Corners (Global Table Radius) */
.feature-comparison-table tfoot tr:last-child td:first-child {
  border-bottom-left-radius: var(--radius-xl);
}
.feature-comparison-table tfoot tr:last-child td:last-child {
  border-bottom-right-radius: var(--radius-xl);
}

/* 6. Button Alignment */
.plan-cta-bottom {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  position: relative; 
  z-index: 5;
}

.plan-cta-bottom .upgrade-btn {
  width: 100%;
  justify-content: center;
  max-width: 180px;
}

.plan-cta-bottom .current-plan-label {
  font-size: var(--font-size-sm);
  color: var(--color-success);
  font-weight: var(--font-weight-semibold);
}

/* --- Welcome Offer Banner --- */
.smart-callout--welcome-offer {
  background: #1e1b4b;
  border: 1px solid #4338ca;
  color: #fff;
  box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.smart-callout--welcome-offer .smart-callout__icon {
  background-color: rgba(255, 255, 255, 0.1);
  color: #fbbf24; /* Amber for urgency */
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  flex-shrink: 0;
}

.smart-callout--welcome-offer .smart-callout__title {
  color: #fff;
  margin-bottom: 4px;
  font-size: 1.1rem;
}

.smart-callout--welcome-offer p {
  color: #e0e7ff;
  margin: 0;
  font-size: 0.95rem;
}

.smart-callout--welcome-offer .welcome-offer-timer {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 700;
  background-color: rgba(0, 0, 0, 0.2);
  padding: 2px 8px;
  border-radius: 4px;
  color: #fbbf24;
  margin-left: 4px;
  letter-spacing: 0.05em;
  display: inline-block;
  min-width: 80px;
  text-align: center;
}

/* 8. Mobile Sticky CTA Bar
----------------------------------------------------- */
.mobile-sticky-cta {
  display: none; /* JS controls visibility */
}

@media (max-width: 991px) {
  .mobile-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff;
    border-top: 1px solid var(--color-slate-200);
    padding: 12px 16px;
    z-index: 1500;
    box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1);
    /* display is controlled by JS — not set here */
  }

  .mobile-sticky-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    max-width: 500px;
    margin: 0 auto;
  }

  .mobile-sticky-cta__info {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .mobile-sticky-cta__plan {
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--color-slate-900);
    line-height: 1.2;
  }

  .mobile-sticky-cta__price {
    font-size: 0.8rem;
    color: var(--color-slate-500);
  }

  .mobile-sticky-cta__btn {
    flex-shrink: 0;
    padding: 12px 24px;
    font-size: 0.95rem;
    font-weight: 700;
    white-space: nowrap;
    letter-spacing: 0.01em;
  }

  /* One-time pulse animation on first appearance */
  @keyframes sticky-cta-pulse {
    0%, 100% { box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.1); }
    50% { box-shadow: 0 -4px 20px rgba(67, 56, 202, 0.25); }
  }
  .mobile-sticky-cta--animate {
    animation: sticky-cta-pulse 0.6s ease-in-out 2;
  }

  /* Add bottom padding to body when sticky bar is visible to prevent content being hidden behind it */
  body.has-sticky-cta {
    padding-bottom: 72px;
  }

  /* Move the FAB above the sticky bar so they don't overlap */
  body.has-sticky-cta .mobile-fab {
    bottom: 84px;
    transition: bottom 0.2s ease;
  }
}

/* 9. Feature Value Type Styles (comparison table cells)
----------------------------------------------------- */
.highlight-value {
  font-weight: var(--font-weight-semibold);
  color: var(--color-primary);
}

.feature-value--muted {
  color: var(--color-slate-400);
  font-size: var(--font-size-sm);
}

.feature-value--active {
  color: var(--color-success);
  font-weight: var(--font-weight-semibold);
}

.feature-value--unlimited {
  color: var(--color-primary);
  font-weight: var(--font-weight-bold);
  letter-spacing: -0.01em;
}

.feature-value--elite {
  color: #7c3aed;
  font-weight: var(--font-weight-semibold);
}

/* 10. Mobile Guarantee Badge (above pricing cards)
----------------------------------------------------- */
.pricing-mobile-guarantee {
  display: none;
}

@media (max-width: 991px) {
  .pricing-mobile-guarantee {
    display: flex;
    justify-content: center;
    margin-bottom: var(--space-2);
  }
  .pricing-mobile-guarantee .guarantee-badge {
    font-size: 0.78rem;
    padding: var(--space-1) var(--space-3);
    margin-bottom: 0;
  }
  /* Hide bottom trust stack on mobile — already shown above cards */
  .feature-comparison-wrapper .trust-stack {
    display: none;
  }
}