/* 
 * Returny - Pricing Page Styles
 * Design: Apple Liquid Glass / Premium SaaS
 */

:root {
    --pricing-card-bg-light: rgba(255, 255, 255, 0.7);
    --pricing-card-bg-dark: rgba(15, 15, 25, 0.6);
    --pricing-border: 1px solid rgba(255, 255, 255, 0.2);
    --pricing-accent-green: #10b981;
    --pricing-accent-orange: #f59e0b;
    --pricing-accent-violet: #8b5cf6;
}

/* --- Hero Section --- */
.ambient-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden; /* Prevent orbs from causing horizontal scroll */
    z-index: 0;
    pointer-events: none;
}

.pricing-hero {
    padding: 60px 20px 80px;
    text-align: center;
    position: relative;
}

.pricing-hero .hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(109, 40, 217, 0.1);
    border: 1px solid rgba(109, 40, 217, 0.2);
    border-radius: 100px;
    color: var(--primary-violet);
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 24px;
    backdrop-filter: blur(10px);
}

.pricing-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-dark);
}

.pricing-title span {
    background: linear-gradient(135deg, var(--primary-violet), #8b5cf6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.pricing-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    max-width: 700px;
    margin: 0 auto 40px;
    line-height: 1.6;
}

/* --- Pricing Cards --- */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
    margin-bottom: 100px;
    position: relative;
    z-index: 2;
}

.pricing-card {
    position: relative;
    padding: 48px 32px;
    border-radius: 32px;
    background: white; /* Solid background for performance */
    border: 1px solid rgba(109, 40, 217, 0.1);
    transition: transform 0.3s cubic-bezier(0.23, 1, 0.32, 1), box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

[data-theme="dark"] .pricing-card {
    background: #110d1f; /* Premium dark solid */
    border-color: rgba(109, 40, 217, 0.2);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.pricing-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 30px 60px rgba(109, 40, 217, 0.15);
    border-color: rgba(109, 40, 217, 0.3);
}

/* Plan Badges */
.plan-badge {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
    display: inline-block;
}

.plan-badge.free { color: var(--pricing-accent-green); }
.plan-badge.pay { color: var(--pricing-accent-orange); }
.plan-badge.sub { color: var(--pricing-accent-violet); }

.plan-price {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 8px;
    display: flex;
    align-items: baseline;
    gap: 4px;
}

.plan-currency {
    font-size: 1.25rem;
    font-weight: 600;
    opacity: 0.7;
}

.plan-period {
    font-size: 1rem;
    font-weight: 400;
    opacity: 0.5;
}

.plan-desc {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
    min-height: 48px;
}

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

.plan-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    font-size: 0.9rem;
    color: var(--text-main);
}

.plan-features li i {
    font-size: 1.2rem;
    color: var(--primary-violet);
}

.plan-features li.disabled {
    opacity: 0.4;
    text-decoration: line-through;
}

/* Card Glow Effects */
.card-glow {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    pointer-events: none;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.pricing-card:hover .card-glow {
    opacity: 1;
}

.card-glow.green { background: radial-gradient(circle at center, rgba(16, 185, 129, 0.15) 0%, transparent 70%); }
.card-glow.orange { background: radial-gradient(circle at center, rgba(245, 158, 11, 0.15) 0%, transparent 70%); }
.card-glow.violet { background: radial-gradient(circle at center, rgba(139, 92, 246, 0.15) 0%, transparent 70%); }

/* Featured Plan */
.pricing-card.featured {
    border: 2px solid var(--primary-violet);
    scale: 1.05;
}

.featured-label {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary-violet);
    color: white;
    padding: 4px 16px;
    border-radius: 100px;
    font-size: 0.75rem;
    font-weight: 700;
}

/* Sub-plans inside Monthly */
.sub-plans-container {
    margin-top: 24px;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 24px;
}

.sub-plan-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    margin-bottom: 12px;
    transition: background 0.3s ease;
}

.sub-plan-item:hover {
    background: rgba(255,255,255,0.1);
}

.sub-plan-name {
    font-weight: 600;
    font-size: 0.85rem;
}

.sub-plan-price {
    font-weight: 700;
    color: var(--primary-violet);
}

/* --- Comparison Table --- */
.comparison-section {
    padding: 100px 20px;
    overflow-x: hidden;
    position: relative;
}

.comparison-table-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    background: white;
    border: 1px solid rgba(109, 40, 217, 0.1);
    border-radius: 32px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .comparison-table-wrapper {
    background: #110d1f;
    border-color: rgba(109, 40, 217, 0.2);
}

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

.comparison-table th, .comparison-table td {
    padding: 24px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.comparison-table th {
    font-weight: 700;
    font-size: 1.1rem;
    background: rgba(109, 40, 217, 0.03);
}

.comparison-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
}

.comparison-table i {
    font-size: 1.5rem;
}

.comparison-table .bx-check { color: var(--pricing-accent-green); }
.comparison-table .bx-x { color: #ef4444; opacity: 0.3; }

/* --- Reveal Animations --- */
.reveal-on-scroll {
    opacity: 1 !important;
    transform: none !important;
}

.reveal-on-scroll.reveal-active {
    opacity: 1;
    transform: none;
}

/* --- AI Value Section --- */
.ai-value-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 48px;
}

.ai-feature-card {
    padding: 32px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    transition: all 0.3s ease;
}

[data-theme="light"] .ai-feature-card {
    background: #ffffff;
    border: 1px solid rgba(109, 40, 217, 0.12);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

.ai-feature-card:hover {
    background: rgba(109, 40, 217, 0.05);
    transform: translateY(-4px);
    border-color: rgba(109, 40, 217, 0.2);
}

[data-theme="light"] .ai-feature-card:hover {
    background: #fdfcff;
    border-color: var(--primary-violet);
    box-shadow: 0 16px 40px rgba(109, 40, 217, 0.1);
}

.ai-feature-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-violet);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    margin-bottom: 20px;
    box-shadow: 0 10px 20px rgba(109, 40, 217, 0.3);
}



/* --- Mobile Responsiveness --- */
@media (max-width: 1024px) {
    .pricing-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin-left: auto;
        margin-right: auto;
        padding: 0;
    }

    .ai-value-grid {
        grid-template-columns: 1fr;
        padding: 0 15px;
    }

    .reveal-on-scroll {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .pricing-card {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        transform: none !important;
    }

    /* Clip overflow at section level */
    .comparison-section {
        padding: 40px 0;
    }

    /* Card: 10px margin each side, scrolls internally */
    .comparison-table-wrapper {
        margin: 0 10px;
        max-width: calc(100% - 20px);
        width: calc(100% - 20px);
        border-radius: 24px;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        box-shadow: 0 16px 40px rgba(0, 0, 0, 0.08);
        background: var(--pricing-card-bg-light);
        border: var(--pricing-border);
        display: block;
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        transform: translateZ(0); /* Hardware acceleration */
    }

    .comparison-table-wrapper::-webkit-scrollbar {
        display: none;
    }

    [data-theme="dark"] .comparison-table-wrapper {
        background: var(--pricing-card-bg-dark);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.4);
    }

    /* Table: wide enough to show all columns clearly */
    .comparison-table {
        min-width: 600px;
        border-collapse: collapse;
        width: 100%;
    }

    .comparison-table th,
    .comparison-table td {
        min-width: 120px;
        padding: 16px 12px;
        white-space: nowrap;
        font-size: 0.9rem;
    }

    .comparison-table td:first-child,
    .comparison-table th:first-child {
        min-width: 140px;
        text-align: left;
        font-weight: 600;
    }
}

.orb {
    position: absolute;
    filter: blur(80px);
    opacity: 0.3;
    border-radius: 50%;
    /* Static for performance */
}

.ambient-fog {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at 10% 20%, rgba(109, 40, 217, 0.03) 0%, transparent 40%),
                radial-gradient(circle at 90% 80%, rgba(59, 130, 246, 0.03) 0%, transparent 40%);
    z-index: -1;
    /* Static for performance */
}
