/**
 * PRICING PAGE STYLES
 * 
 * This stylesheet contains all styles for the pricing page including:
 * - Hero section with billing toggle
 * - Pricing cards with three tiers
 * - Trust and social proof section
 * - FAQ section
 * - Responsive layouts for mobile and desktop
 */

/* ==========================================================================
   PRICING HERO SECTION
   ========================================================================== */

.pricing-hero {
    background: linear-gradient(135deg, #f5f7ff 0%, #ffffff 100%);
    padding: 2.5rem 0 1.5rem;
    text-align: center;
}

.pricing-hero__content {
    max-width: 700px;
    margin: 0 auto 2.5rem;
}

.pricing-hero__title {
    font-size: 3rem;
    font-weight: 700;
    color: #121212;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.pricing-hero__subtitle {
    font-size: 1.25rem;
    color: #555;
    line-height: 1.6;
    margin-bottom: 0;
}

/* ==========================================================================
   BILLING TOGGLE SWITCH
   ========================================================================== */

.billing-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin: 0 auto;
    max-width: 400px;
}

.billing-toggle__label {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    transition: color 0.3s ease;
}

.billing-toggle__label[data-period="monthly"] {
    color: #5B3AFF;
}

/* When annual is selected, swap the colors */
.billing-toggle input:checked ~ .billing-toggle__label[data-period="monthly"] {
    color: #333;
}

.billing-toggle input:checked ~ .billing-toggle__label[data-period="annual"] {
    color: #5B3AFF;
}

.billing-toggle__savings {
    display: inline-block;
    background-color: #10b981;
    color: white;
    font-size: 0.75rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    margin-left: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Toggle Switch Component */
.billing-toggle__switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
    cursor: pointer;
}

.billing-toggle__switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.billing-toggle__slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.billing-toggle__slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.billing-toggle__switch input:checked + .billing-toggle__slider {
    background-color: #5B3AFF;
}

.billing-toggle__switch input:checked + .billing-toggle__slider:before {
    transform: translateX(26px);
}

/* ==========================================================================
   PRICING SECTION & GRID
   ========================================================================== */

.pricing-section {
    background-color: #ffffff;
    padding: 4rem 0;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* ==========================================================================
   PRICING CARDS
   ========================================================================== */

.pricing-card {
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

/* Hover animation removed - pricing cards are now static */
.pricing-card:hover {
    transform: none;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); /* Match base state exactly */
    border-color: #e5e7eb; /* Match base state exactly */
}

/* Premium treatment for the center (Pro) card with gradient border and background */
.pricing-card--recommended {
    position: relative;
    border: 0; /* gradient border via background technique */
    border-radius: 16px;
    /* Multiple backgrounds: inner gradient + gradient border */
    background: 
        /* inner background with subtle vertical gradient */
        linear-gradient(180deg, #f8f6ff 0%, #ffffff 55%, #f3f0ff 100%) padding-box,
        /* vibrant gradient border */
        linear-gradient(135deg, #5B3AFF 0%, #8B5CF6 50%, #A78BFA 100%) border-box;
    border: 4px solid transparent; /* thickness of the gradient ring */
    box-shadow: 0 16px 36px rgba(91, 58, 255, 0.28);
    transform: scale(1.05);
}

/* Soft inner glow on hover removed - recommended card is now static */
.pricing-card--recommended:hover {
    transform: scale(1.05); /* Maintain base scale, no translateY */
    box-shadow: 0 16px 36px rgba(91, 58, 255, 0.28); /* Match base state exactly */
    border: 4px solid transparent; /* Maintain gradient border thickness */
    /* Maintain gradient border and background on hover */
    background: 
        /* inner background with subtle vertical gradient */
        linear-gradient(180deg, #f8f6ff 0%, #ffffff 55%, #f3f0ff 100%) padding-box,
        /* vibrant gradient border */
        linear-gradient(135deg, #5B3AFF 0%, #8B5CF6 50%, #A78BFA 100%) border-box;
}

/* Optional inner highlight for extra depth */
.pricing-card--recommended::after {
    content: "";
    position: absolute;
    inset: 1px;
    border-radius: 14px;
    background: radial-gradient(120% 60% at 50% -10%, rgba(123, 97, 255, 0.10), rgba(255, 255, 255, 0) 45%);
    pointer-events: none;
    z-index: 0;
}

/* Create a small curved "seat" for the badge so it integrates with the border */
/* Remove the previous seat approach in favor of a badge-attached bridge */
.pricing-card--recommended::before { content: none; }

/* Popular Badge - docked into the top edge */
.pricing-card__badge {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #5B3AFF 0%, #7C3AED 100%);
    color: white;
    font-size: 0.875rem;
    font-weight: 700;
    padding: 0.45rem 1.25rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 8px 18px rgba(91, 58, 255, 0.30);
    z-index: 3;
}

/* Remove the tab/halo variant per simplification */
.pricing-card__badge-tab { display: none !important; }

/* Card Header */
.pricing-card__header {
    margin-bottom: 1.5rem;
}

.pricing-card__title {
    font-size: 1.75rem;
    font-weight: 700;
    color: #121212;
    margin-bottom: 0.75rem;
}

.pricing-card__description {
    font-size: 1rem;
    color: #666;
    line-height: 1.5;
    min-height: 48px; /* Ensures consistent card heights */
}

/* ==========================================================================
   PRICE DISPLAY
   ========================================================================== */

.pricing-card__price {
    margin-bottom: 1rem; /* tighter vertical rhythm below price */
    min-height: 96px; /* reduced baseline; JS still locks tallest height */
    position: relative; /* Allows stacking price states */
    overflow: hidden; /* Prevents inner transitions from affecting layout */
}

/* Stack monthly and annual states in the same footprint to avoid reflow */
/* Only stack the two top-level states; do not affect inner nodes */
.pricing-card__price > .price-display,
.pricing-card__price > .price-display-wrapper {
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    width: 100%;
    opacity: 0;
    transition: opacity 250ms ease;
    pointer-events: none; /* avoid interacting with hidden state */
}

/* Active state becomes visible and sits above the other */
.pricing-card__price > .is-active {
    opacity: 1;
    z-index: 1;
    pointer-events: auto;
}

/* Wrapper for annual pricing display (contains strikethrough + new price) */
.price-display-wrapper {
    text-align: center;
}

.price-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.15rem; /* reduced horizontal gaps for a tighter row */
    will-change: opacity, transform; /* Hint for smoother transitions */
}

.price-display__currency {
    font-size: 2rem;
    font-weight: 700;
    color: #121212;
}

.price-display__amount {
    font-size: 4.5rem;
    font-weight: 700;
    color: #5B3AFF;
    line-height: 1;
    letter-spacing: -0.5px; /* optical tightening for large numerals */
    transition: transform 0.25s ease, opacity 0.25s ease; /* subtle animation */
}

/* Cents portion styling - significantly smaller and positioned at top */
.price-display__cents {
    font-size: 1.5rem; /* ~33% of main price size for significant visual hierarchy */
    font-weight: 600;
    vertical-align: super;
    position: relative;
    top: -0.8rem; /* Position at top like superscript */
    margin-left: 0.1rem;
}

.price-display__period {
    font-size: 1.25rem;
    color: #666;
    font-weight: 500;
}

.price-display__billed {
    display: block;
    width: 100%;
    text-align: center;
    font-size: 0.875rem;
    color: #888;
    margin-top: 0.5rem; /* helper sits close to price */
}

/* Strikethrough pricing for annual toggle - shows old monthly price crossed out */
/* Strikethrough block removed in favor of inline savings chip */
.price-display__strikethrough { display: none; }

.price-display__strikethrough .price-display__currency { display: none; }

.price-display__strikethrough .price-display__amount { display: none; }

.price-display__strikethrough .price-display__period { display: none; }

/* Inline savings chip shown in annual state - positioned next to "Billed annually" text */
.price-savings-chip {
    display: inline-flex;
    align-items: center;
    margin-left: 0.5rem;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 700;
    background-color: #10b981; /* emerald */
    color: #ffffff;
    border-radius: 999px;
    box-shadow: 0 2px 6px rgba(16, 185, 129, 0.25);
    line-height: 1;
    white-space: nowrap;
    vertical-align: middle; /* Align with the "Billed annually" text */
}

/* Custom pricing for Enterprise */
.price-display--custom {
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.price-display__custom {
    font-size: 2rem;
    font-weight: 700;
    color: #121212;
}

/* ==========================================================================
   FEATURE LIST
   ========================================================================== */

.pricing-card__features {
    list-style: none !important;
    list-style-type: none !important;
    padding: 0;
    padding-left: 1.5rem;
    margin: 0 0 2rem 0;
    flex-grow: 1; /* Pushes CTA button to bottom */
}

/* Feature list items (scoped to pricing cards) with single blue bullet */
.pricing-card__features .feature-item {
    display: block; /* Override default list-item display */
    margin-bottom: 1rem;
    padding: 0.5rem 0;
    list-style: none !important;
    list-style-type: none !important;
    position: relative;
    padding-left: 0;
}

/* Remove default list marker completely (scoped) */
.pricing-card__features .feature-item::marker {
    content: none !important;
    display: none !important;
}

/* Single circular bullet created with ::before (scoped) */
.pricing-card__features .feature-item::before {
    content: "";
    position: absolute;
    left: -1rem; /* aligns within UL padding */
    top: 0.8rem;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #5B3AFF;
}

.pricing-card__features .feature-item__icon {
    /* Legacy icon styles - no longer used but kept for compatibility */
    display: none;
}

.pricing-card__features .feature-item__text {
    font-size: 1rem;
    color: #333;
    line-height: 1.5;
}

.pricing-card__features .feature-item__text strong {
    font-weight: 700;
    color: #121212;
}

/* ==========================================================================
   OVERAGE INFO CALLOUT
   ========================================================================== */

/* Info callout box that appears in pricing cards to explain overages and limits */
.pricing-card__overage-info {
    background-color: #f0edff;
    border-left: 4px solid #5B3AFF;
    padding: 1rem;
    margin: 1.5rem 0;
    border-radius: 6px;
    font-size: 0.9rem;
    line-height: 1.5;
}

.pricing-card__overage-info p {
    margin: 0.5rem 0;
    color: #333;
}

.pricing-card__overage-info strong {
    color: #5B3AFF;
    font-weight: 600;
}

/* ==========================================================================
   CTA BUTTONS
   ========================================================================== */

.pricing-card__cta {
    margin-top: auto; /* Aligns button to bottom of card */
}

.pricing-button {
    display: block;
    width: 100%;
    padding: 1rem 2rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    color: #5B3AFF;
    background-color: transparent;
    border: 2px solid #5B3AFF;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.pricing-button:hover {
    background-color: #5B3AFF;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(91, 58, 255, 0.3);
}

/* Primary button for recommended plan */
.pricing-button--primary {
    background-color: #5B3AFF;
    color: white;
}

.pricing-button--primary:hover {
    background-color: #491CFF;
    border-color: #491CFF;
    box-shadow: 0 8px 20px rgba(73, 28, 255, 0.4);
}

/* ==========================================================================
   ENTERPRISE & NETWORK LICENSING SECTION
   ========================================================================== */

.pricing-enterprise {
    background-color: #f9fafb;
    padding: 3rem 0;
    border-top: 1px solid #e5e7eb;
}

.pricing-enterprise__content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: 0 1.5rem;
}

.pricing-enterprise__title {
    font-size: 2rem;
    font-weight: 700;
    color: #121212;
    margin-bottom: 1rem;
}

.pricing-enterprise__text {
    font-size: 1.1rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

.pricing-enterprise__text a {
    color: #5B3AFF;
    text-decoration: none;
    font-weight: 600;
}

.pricing-enterprise__text a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   TRUST & SOCIAL PROOF SECTION
   ========================================================================== */

.pricing-trust {
    background-color: #f9fafb;
    padding: 4rem 0;
}

.pricing-trust__title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #121212;
    margin-bottom: 3rem;
}

.pricing-trust__content {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    max-width: 1100px;
    margin: 0 auto;
}

.trust-feature {
    text-align: center;
}

.trust-feature__icon {
    width: 48px;
    height: 48px;
    color: #5B3AFF;
    margin: 0 auto 1.5rem;
}

.trust-feature__title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #121212;
    margin-bottom: 0.75rem;
}

.trust-feature__text {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
}

/* ==========================================================================
   FAQ SECTION
   ========================================================================== */

.pricing-faq {
    background-color: #ffffff;
    padding: 2.5rem 0; /* Reduced vertical padding for more compact section */
}

.pricing-faq__title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    color: #121212;
    margin-bottom: 1.5rem; /* Reduced spacing below title */
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr; /* Single column layout - FAQ items stack vertically */
    gap: 1.25rem; /* Reduced gap between grid items */
    max-width: 1100px;
    margin: 0 auto;
}

.faq-item {
    background-color: #f9fafb;
    padding: 1.5rem 1.75rem; /* Reduced padding for more compact cards */
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    margin-bottom: 0.75rem; /* Reduced spacing between cards */
}

/* Hover state for FAQ items - subtle visual feedback */
.faq-item:hover {
    border-color: #5B3AFF;
    box-shadow: 0 2px 8px rgba(91, 58, 255, 0.1);
}

/* FAQ item header contains question and chevron icon */
.faq-item__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.faq-item__question {
    font-size: 1.25rem;
    font-weight: 600;
    color: #121212;
    margin: 0;
    flex: 1;
}

/* Chevron icon rotates when FAQ is expanded */
.faq-item__chevron {
    width: 24px;
    height: 24px;
    color: #5B3AFF;
    flex-shrink: 0;
    transition: transform 0.3s ease;
    margin-top: 0.125rem; /* Slight vertical alignment adjustment */
}

/* Rotate chevron when FAQ item is expanded */
.faq-item.is-expanded .faq-item__chevron {
    transform: rotate(180deg);
}

/* Content wrapper that collapses/expands */
.faq-item__content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding-top 0.3s ease;
    padding-top: 0;
}

/* Expanded state - content is visible */
.faq-item.is-expanded .faq-item__content {
    max-height: 500px; /* Large enough to accommodate any answer */
    padding-top: 1rem;
}

.faq-item__answer {
    font-size: 1rem;
    color: #555;
    line-height: 1.6;
    margin: 0;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */

/* Tablet (768px - 1024px) */
@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
        max-width: 500px;
    }
    
    .pricing-card--recommended {
        transform: scale(1);
    }
    
    .pricing-card--recommended:hover {
        transform: scale(1); /* Match base state exactly - no translateY */
    }
    
    .pricing-trust__content {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
    }
}

/* Mobile (below 768px) */
@media (max-width: 768px) {
    .pricing-hero {
        padding: 1.75rem 0 1.25rem; /* reduced vertical padding */
    }
    
    .pricing-hero__title {
        font-size: 2.5rem;
    }
    
    .pricing-hero__subtitle {
        font-size: 1rem; /* slightly smaller */
        line-height: 1.45; /* tighter */
    }

    .pricing-hero__content {
        margin: 0 auto 1.25rem; /* less space below hero copy */
    }
    
    .billing-toggle {
        flex-direction: column;
        gap: 1rem;
    }
    
    .billing-toggle__label {
        font-size: 1rem;
    }
    
    .pricing-section {
        padding: 3rem 0;
    }
    
    .pricing-card {
        padding: 2rem 1.5rem;
    }
    
    .pricing-card__title {
        font-size: 1.5rem;
    }
    
    .price-display__amount {
        font-size: 3.25rem; /* slightly larger than before for balance */
    }
    
    /* Responsive cents styling for mobile */
    .price-display__cents {
        font-size: 1.1rem;
        top: -0.6rem;
    }
    
    .pricing-trust,
    .pricing-faq {
        padding: 2rem 0; /* Reduced padding for mobile */
    }
    
    .pricing-enterprise {
        padding: 2.5rem 0;
    }
    
    .pricing-enterprise__title {
        font-size: 1.75rem;
    }
    
    .pricing-enterprise__text {
        font-size: 1rem;
    }
    
    .pricing-trust__title,
    .pricing-faq__title {
        font-size: 2rem;
    }
    
    .faq-item {
        padding: 1.25rem 1.5rem; /* Compact padding for mobile */
    }
    
    .faq-item__question {
        font-size: 1.1rem;
    }
    
    .faq-item__chevron {
        width: 20px;
        height: 20px;
    }
}

/* Small Mobile (below 480px) */
@media (max-width: 480px) {
    .pricing-hero__title {
        font-size: 2rem; /* compact but legible */
        line-height: 1.15;
        margin-bottom: 0.5rem;
    }
    
    .pricing-card__description {
        min-height: auto;
    }
    
    .price-display__amount {
        font-size: 2.5rem;
    }
    
    .price-display__currency {
        font-size: 1.5rem;
    }
    
    /* Responsive cents styling for small mobile */
    .price-display__cents {
        font-size: 0.9rem;
        top: -0.4rem;
    }

    .price-savings-chip {
        font-size: 0.7rem;
        padding: 0.1rem 0.4rem; /* tighter on very small screens */
    }

    /* Keep billing toggle on one line and shrink components */
    .billing-toggle {
        flex-direction: row;
        flex-wrap: nowrap;
        gap: 0.5rem;
        max-width: 100%;
    }
    .billing-toggle__label {
        font-size: 0.95rem;
    }
    .billing-toggle__switch {
        width: 48px;
        height: 28px;
    }
    .billing-toggle__slider:before {
        width: 22px;
        height: 22px;
        left: 3px;
        bottom: 3px;
    }
    .billing-toggle__switch input:checked + .billing-toggle__slider:before {
        transform: translateX(20px);
    }
    .billing-toggle__savings {
        font-size: 0.65rem;
        padding: 0.15rem 0.4rem;
    }
    .billing-toggle { margin-top: 0.25rem; }

    /* Scale badge on mobile */
    .pricing-card__badge {
        padding: 0.35rem 1rem;
        font-size: 0.8rem;
    }
    .pricing-card__badge-tab {
        width: 160px;
        height: 14px;
        top: 8px;
    }
    
    .pricing-enterprise__title {
        font-size: 1.5rem;
    }
    
    .pricing-enterprise__text {
        font-size: 0.95rem;
    }
}

/* ==========================================================================
   SMOOTH TRANSITIONS FOR JAVASCRIPT INTERACTIONS
   ========================================================================== */

.price-display {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.price-display[data-period] {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

