/* =========================================================
   Catholic Gallery App Exit-Intent Popup
   ========================================================= */

#bio_ep {
    position: fixed;
    left: 50%;
    top: 50%;
    width: 475px;
    max-width: calc(100vw - 30px);
    max-height: calc(100vh - 30px);
    box-sizing: border-box;
    overflow: auto;

    background: #fff;
    color: #000;
    font-family: 'Josefin Sans', sans-serif;
    font-size: 22px;
    font-weight: 400;

    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    border-radius: 2px;
    z-index: 10002;

    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -46%) scale(0.98);
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0.2s ease;
}

#bio_ep.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

#bio_ep #content {
    display: flex;
    flex-direction: column;
    width: 100%;
    min-height: 420px;
    padding: 20px;
    box-sizing: border-box;
    justify-content: center;
    align-items: center;
}

#bio_ep a {
    text-decoration: none;
    border: 0;
}

.bioep_subs,
.bioep_time_text,
.paExitDownloadNow,
.paExitLogo {
    text-align: center;
}

.bioep_subs {
    margin: 0 auto 20px;
    font-size: 24px;
    color: #de0700;
}

.bioep_time_text {
    font-size: 24px;
    line-height: 1.2;
    margin-bottom: 25px;
}

.paExitDownloadNow {
    margin-bottom: 0;
}

.paExitLogo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.paExitLogo a {
    display: inline-block;
    margin: 10px auto 30px;
}

.bioep_logo {
    display: block;
    width: 160px;
    max-width: 100%;
    height: auto;
    max-height: 50px;
    margin: 0 auto;
}

#bio_ep_close {
    padding: 0;
    border: 0;
    background: none;

    font-family: Roboto, sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #de0700;

    text-decoration: underline;
    cursor: pointer;
}

#bio_ep_close:hover {
    text-decoration: none;
}

#bio_ep_close:focus-visible {
    outline: 2px solid currentColor;
    outline-offset: 3px;
}

/* Popup backdrop */
#bio_ep_bg {
    position: fixed;
    inset: 0;
    display: block;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    visibility: hidden;
    z-index: 10001;
    transition:
        opacity 0.2s ease,
        visibility 0.2s ease;
}

body.cg-exit-popup-open #bio_ep_bg {
    opacity: 1;
    visibility: visible;
}

/* Mobile */
@media (max-width: 760px) {

    #bio_ep {
        width: 350px;
        max-width: calc(100vw - 30px);
    }

    #bio_ep #content {
        min-height: 0;
        padding: 20px;
    }

    .bioep_subs {
        font-size: 24px;
    }

    .bioep_time_text {
        font-size: 22px;
    }

    .paExitLogo {
        gap: 10px;
    }

    .bioep_logo {
        width: 145px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    #bio_ep {
        transition: none;
    }
}
