/* Stay Informed CTA Component - Scoped Styles */

/* Side CTA - Desktop Only (>1024px) */
.stay-informed-wrapper {
    position: fixed;
    z-index: 200;
    transition: all 0.3s ease-in-out;
    display: none; /* Hidden by default */
    visibility: hidden; /* Ensure no flash on load */
    opacity: 0;
    pointer-events: none;
}

/* Show when activated */
.stay-informed-wrapper.is-active {
    display: block;
    visibility: visible;
    opacity: 1;
}

/* Default state - hidden off-screen on desktop only on initial page load */
@media (min-width: 769px) {
    .stay-informed-wrapper.is-active {
        bottom: 60px;
        left: 5px;
    }

    /* Initial state - hidden by default */
    .stay-informed-wrapper .cta-container {
        transform: translateX(-200%);
        opacity: 0;
        pointer-events: none;
        width: 188px;
        height: 225px;
        margin: 0 0 -40px;
        border: none;
        position: relative;
        background-image: url('/wp-content/uploads/static/side-badge-bg.png');
        background-repeat: no-repeat;
        background-size: cover;
        display: flex;
        justify-content: center;
        align-items: end;
        padding: 0 0 70px 0;
        transition: none; /* Start with no transition */
        cursor: pointer;
        will-change: transform, opacity;
        text-decoration: none;
        color: inherit;
    }

    /* Enable transitions only after initialization */
    .stay-informed-wrapper .cta-container.initialized {
        transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    }

    /* Slide in/out states */
    .stay-informed-wrapper .cta-container.slide-in {
        transform: translateX(0);
        opacity: 1;
        pointer-events: auto;
    }

    .stay-informed-wrapper .cta-container.slide-out {
        transform: translateX(-200%);
        opacity: 0;
        pointer-events: none;
    }

    /* Animation badges */
    .stay-informed-wrapper .cta-container #balloon-badge,
    .stay-informed-wrapper .cta-container #speech-badge {
        position: absolute;
        width: 100%;
        height: 100%;
        object-fit: contain;
        transition: opacity 0.3s ease-in-out;
    }

    .stay-informed-wrapper .cta-container #balloon-badge {
        top: -40px;
        left: 40px;
        width: 70px;
        height: auto;
    }

    .stay-informed-wrapper .cta-container #speech-badge {
        width: 116px;
        height: auto;
        right: -55px;
        top: -70px;
    }

    /* Side badge text */
    .stay-informed-wrapper .cta-hero-button {
        font-size: 15px;
        padding-left: 10px;
        padding-bottom: 3px;
        font-weight: 600;
        color: var(--color-red);
        text-decoration: none;
        z-index: 1;
        pointer-events: none;
    }

    .stay-informed-wrapper .cta-hero-button:hover {
        text-decoration: underline;
    }

    .stay-informed-wrapper .cta-container:hover .cta-hero-button {
        text-decoration: underline;
    }
}

/* Hide side badge on mobile */
@media (max-width: 768px) {
    .stay-informed-wrapper {
        display: none;
    }
}

/* Footer CTA - Mobile Only (≤768px) */
.stay-informed-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 200;
    display: none; /* Hidden by default */
}

/* Emma balloon positioned independently */
.footer-emma-balloon {
    position: absolute;
    bottom: 0;
    left: 5px;
    max-width: 120px;
    height: auto;
    z-index: 201;
    pointer-events: none;
}

/* Footer Emma Balloon Disclaimer */
.footer-badge-disclaimer {
    position: absolute;
    bottom: 5px;
    left: 125px;
    font-weight: 500;
    font-size: 8px;
    line-height: 1.2;
    color: var(--color-white);
    text-align: center;
    white-space: nowrap;
    z-index: 202;
    pointer-events: none;
    margin: 0;
}

/* Show footer CTA on mobile */
@media all and (max-width: 768px) {
    .stay-informed-footer {
        display: block;
    }

    /* Clipped content container */
    .stay-informed-footer > .footer-content {
        width: 100%;
        padding: 20px;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 15px;
        min-height: 100px;
        text-align: center;
        background-color: var(--color-red);
        clip-path: var(--clip-path-smooth-bowl);
        z-index: 1;
        cursor: pointer;
        text-decoration: none;
        margin-bottom: -5px;
    }

    .stay-informed-footer .footer-text {
        font-size: 18px;
        color: var(--color-white);
        margin: 0;
        font-weight: 600;
        flex: 1;
        padding-left: 35%;
        min-width: 280px;
    }

    .stay-informed-footer .footer-arrow {
        width: 35px;
        height: 35px;
        min-width: 35px;
        background-image: url('/wp-content/uploads/static/badge-arrow.png');
        background-size: contain;
        background-repeat: no-repeat;
    }
}

.stay-informed-wrapper .cta-container.slide-out {
    transform: translateX(-200%);
    opacity: 0;
    pointer-events: none;
}

.stay-informed-wrapper .cta-hero-button {
    font-size: 15px;
    padding-left: 10px;
    font-weight: 600;
    color: var(--color-red);
    text-decoration: none;
}

.stay-informed-wrapper .cta-hero-button.desktop {
    display: block;
}

.stay-informed-wrapper .cta-hero-button.mobile {
    display: none;
}

.stay-informed-wrapper .cta-hero-button:hover {
    text-decoration: underline;
}

.stay-informed-wrapper .cta-container:hover .cta-hero-button {
    text-decoration: underline;
}

/* Badge positioning */
.stay-informed-wrapper .cta-container #balloon-badge,
.stay-informed-wrapper .cta-container #speech-badge {
    position: absolute;
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: opacity 0.3s ease-in-out;
}

.stay-informed-wrapper .cta-container #balloon-badge {
    top: -40px;
    left: 40px;
    width: 70px;
}

.stay-informed-wrapper .cta-container #speech-badge {
    width: 116px;
    right: -35px;
    top: -100px;
}

/* Cookie consent integration */
div#cookie-law-info-again {
    font-size: 14px;
    padding: 5px 10px;
    text-align: center;
    z-index: 2000;
    cursor: pointer;
    box-shadow: none;
    background-color: var(--color-yellow) !important;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
    width: 175px !important;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0;
    margin: 0 auto;
    left: 0;
    right: 0 !important;
    border: 2px solid var(--color-white);
    border-bottom: none;
    position: fixed;
    bottom: 0 !important; /* Default position at bottom */
    transition: bottom 0.3s ease-in-out !important;
}

/* Move cookie consent up when footer CTA is present */
div#cookie-law-info-again.slide-up {
    bottom: 92px !important; /* Moved up for footer CTA */
}

@media all and (max-width: 1200px) {
    div#cookie-law-info-again {
        position: fixed;
        z-index: 1000;
        transition: bottom 0.5s ease-in-out;
    }
    
    div#cookie-law-info-again.slide-down {
        bottom: 0 !important;
    }
}

/* Responsive breakpoints matching original design */
@media all and (max-width: 1599px) {
    .stay-informed-wrapper .cta-container {
        width: 138px;
        height: 170px;
        padding: 0 0 53px 0;
    }

    .stay-informed-wrapper .cta-hero-button {
        font-size: 12px;
        padding-left: 5px;
    }

    .stay-informed-wrapper .cta-container #balloon-badge {
        top: -35px;
        left: 30px;
        width: 50px;
    }

    .stay-informed-wrapper .cta-container #speech-badge {
        width: 86px;
        right: -25px;
        top: -80px;
    }
}

@media all and (max-width: 1024px) {
    .stay-informed-wrapper .cta-container {
        width: 108px;
        height: 125px;
        padding: 0 0 34px 0;
    }

    .stay-informed-wrapper .cta-hero-button {
        font-size: 10px;
        padding-left: 0px;
    }

    .stay-informed-wrapper .cta-container #balloon-badge {
        top: -30px;
        left: 20px;
        width: 40px;
    }

    .stay-informed-wrapper .cta-container #speech-badge {
        width: 65px;
        right: -20px;
        top: -60px;
    }
}

@media all and (max-width: 576px) {
    .stay-informed-wrapper .cta-container .cta-hero-button.mobile {
        left: 130px;
    }
    
    .stay-informed-wrapper .cta-container {
        background-position: -15px 5px;
    }
}

@media all and (max-width: 400px) {
    /* Additional mobile adjustments if needed */
} 