/* ==========================================================================
   Exit-Intent Popup + Sticky Mobile CTA
   ========================================================================== */

/* Overlay */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: var(--spacing-md);
}

.popup-overlay.is-visible {
    display: flex;
}

/* Popup Card */
.popup {
    background: var(--color-white);
    border-radius: var(--radius-lg);
    padding: var(--spacing-xl) var(--spacing-lg);
    max-width: 480px;
    width: 100%;
    position: relative;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: popupSlideUp 0.3s ease-out;
}

@keyframes popupSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Close Button */
.popup__close {
    position: absolute;
    top: 12px;
    right: 12px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-text-light);
    padding: 4px;
    border-radius: 50%;
    transition: background-color 0.2s, color 0.2s;
}

.popup__close:hover {
    background-color: #f0f0f0;
    color: var(--color-text);
}

.popup__close svg {
    width: 100%;
    height: 100%;
}

/* Content */
.popup__heading {
    font-size: 24px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--color-text);
    margin-bottom: var(--spacing-sm);
}

.popup__subtitle {
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text-light);
    margin-bottom: var(--spacing-lg);
}

.popup__cta {
    display: block;
    width: 100%;
    margin-bottom: var(--spacing-sm);
}

.popup__dismiss {
    background: none;
    border: none;
    color: var(--color-text-light);
    font-size: 14px;
    cursor: pointer;
    padding: var(--spacing-xs) var(--spacing-sm);
    transition: color 0.2s;
}

.popup__dismiss:hover {
    color: var(--color-text);
}

/* Mobile: slide-up banner instead of centered popup */
@media (max-width: 768px) {
    .popup-overlay {
        align-items: flex-end;
        padding: 0;
    }

    .popup {
        border-radius: var(--radius-lg) var(--radius-lg) 0 0;
        max-width: 100%;
        padding: var(--spacing-lg) var(--spacing-md);
    }

    .popup__heading {
        font-size: 20px;
    }

    .popup__subtitle {
        font-size: 14px;
    }
}

/* ==========================================================================
   Sticky Mobile CTA Bar
   ========================================================================== */

.sticky-cta {
    display: none;
}

@media (max-width: 768px) {
    .sticky-cta {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 9998;
        background: var(--color-white);
        border-top: 1px solid var(--color-border);
        box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.1);
        padding: 8px 16px;
        align-items: center;
        justify-content: center;
        transition: transform 0.3s ease;
    }

    .sticky-cta.is-hidden {
        transform: translateY(100%);
    }

    .sticky-cta__link {
        display: block;
        width: 100%;
        text-align: center;
        background: var(--color-primary);
        color: var(--color-white);
        font-size: 15px;
        font-weight: 600;
        padding: 12px 24px;
        border-radius: var(--radius-md);
        text-decoration: none;
        transition: background-color 0.2s;
    }

    .sticky-cta__link:hover {
        background: var(--color-primary-dark, #e06b10);
    }
}
