/* Live Savings Ticker - Creates urgency and social proof */
/* Sticky at top so it's always visible above navbar */
.live-savings-bar {
    position: sticky;
    top: 0;
    background: linear-gradient(90deg, #10b981, #059669);
    color: white;
    padding: 0.5rem 0;
    z-index: 1001;
    /* Above navbar (1000) */
    overflow: hidden;
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: 0 2px 10px rgba(16, 185, 129, 0.3);
    /* Reserve space for ticker to prevent CLS */
    min-height: 38px;
}

/* Push navbar down when savings bar is present */
body.has-savings-bar .navbar {
    top: 38px;
}

/* Adjust hero section padding when bar is present */
body.has-savings-bar .hero {
    padding-top: calc(8rem + 38px);
}

.ticker-content {
    display: flex;
    animation: ticker-scroll 30s linear infinite;
    white-space: nowrap;
}

.ticker-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0 3rem;
}

.ticker-item::after {
    content: '•';
    margin-left: 3rem;
    opacity: 0.5;
}

.ticker-amount {
    font-weight: 700;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
}

.ticker-location {
    opacity: 0.9;
}

@keyframes ticker-scroll {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* Removed: Dynamic padding was causing CLS */
/* Ticker is now relative position, no padding needed */

/* Comparison Table Widget */
.quick-compare-section {
    padding: 3rem 0;
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
}

.compare-table-wrapper {
    overflow-x: auto;
    margin-top: 2rem;
}

.compare-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.compare-table th {
    background: var(--primary);
    color: white;
    padding: 1.2rem;
    font-weight: 600;
    text-align: left;
}

.compare-table th:first-child {
    border-radius: 16px 0 0 0;
}

.compare-table th:last-child {
    border-radius: 0 16px 0 0;
}

.compare-table td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.compare-table tr:last-child td {
    border-bottom: none;
}

.compare-table tr:hover td {
    background: #f8fafc;
}

.carrier-cell {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
}

.carrier-logo {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    color: white;
}

.rating-stars {
    color: #f59e0b;
    font-size: 0.9rem;
}

.price-cell {
    font-weight: 700;
    font-size: 1.3rem;
    color: var(--primary);
}

.price-cell span {
    font-weight: 400;
    font-size: 0.9rem;
    color: var(--gray-500);
}

.badge-cell {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.carrier-badge {
    padding: 0.25rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-best {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.badge-cheap {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
}

.badge-fast {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
}

.compare-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary);
    color: white;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    text-decoration: none;
}

.compare-cta-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Scroll-Triggered CTA */
.scroll-cta {
    position: fixed;
    bottom: -100px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #1e3a5f 0%, #0f172a 100%);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    gap: 1.5rem;
    z-index: 1000;
    transition: bottom 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.scroll-cta.visible {
    bottom: 100px;
}

.scroll-cta-text {
    display: flex;
    flex-direction: column;
}

.scroll-cta-title {
    font-weight: 700;
    font-size: 1rem;
}

.scroll-cta-sub {
    font-size: 0.85rem;
    opacity: 0.8;
}

.scroll-cta-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s;
    white-space: nowrap;
}

.scroll-cta-btn:hover {
    transform: scale(1.05);
    box-shadow: 0 5px 20px rgba(16, 185, 129, 0.4);
}

.scroll-cta-close {
    position: absolute;
    top: -10px;
    right: -10px;
    background: white;
    color: var(--dark);
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Enhanced Exit Intent Popup */
.mega-exit-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.mega-exit-overlay.active {
    display: flex;
    opacity: 1;
}

.mega-exit-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    border-radius: 24px;
    max-width: 550px;
    width: 90%;
    text-align: center;
    position: relative;
    overflow: hidden;
    animation: popIn 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes popIn {
    from {
        transform: scale(0.8);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.mega-exit-header {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    padding: 2rem;
}

.mega-exit-savings {
    font-size: 4rem;
    font-weight: 900;
    line-height: 1;
    margin: 0.5rem 0;
    text-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.mega-exit-body {
    padding: 2rem;
}

.mega-exit-features {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin: 1.5rem 0;
}

.mega-exit-feature {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.feature-icon {
    font-size: 2rem;
}

.feature-text {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--gray-700);
}

.mega-exit-btn {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 1.2rem;
    border-radius: 12px;
    font-size: 1.2rem;
    font-weight: 700;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    margin-bottom: 1rem;
}

.mega-exit-btn:hover {
    transform: scale(1.02);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

.mega-exit-skip {
    color: var(--gray-500);
    font-size: 0.9rem;
    cursor: pointer;
}

.mega-exit-skip:hover {
    color: var(--gray-700);
}

.mega-exit-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: rgba(255, 255, 255, 0.8);
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
}

.mega-exit-close:hover {
    color: white;
}

/* Mobile responsiveness */
@media (max-width: 768px) {
    .scroll-cta {
        left: 1rem;
        right: 1rem;
        transform: none;
        padding: 0.8rem 1rem;
        gap: 1rem;
    }

    .scroll-cta.visible {
        bottom: 80px;
    }

    .mega-exit-features {
        flex-direction: column;
        gap: 1rem;
    }

    .mega-exit-savings {
        font-size: 3rem;
    }

    .compare-table {
        font-size: 0.85rem;
    }
}