/*** Pro-Vigil welcome modal (lib/pro-vigil-modal) ***/
/* Layout follows the Redirected Traffic Modal in style.css; the panel is white because the
   Pro-Vigil and ECAM logo is dark. Visibility is driven by the hidden attribute, not by a
   state class, so WP Rocket's Remove Unused CSS has nothing to drop. */

.pv-modal {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    animation: pv-modal-fade 300ms ease-out;
}

.pv-modal[hidden] {
    display: none;
}

@keyframes pv-modal-fade {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@media (prefers-reduced-motion: reduce) {
    .pv-modal {
        animation: none;
    }
}

.pv-modal .pv-modal__content {
    width: 546px;
    max-width: 85vw;
    max-height: 90vh;
    overflow-y: auto;
    background: #fff;
    color: #000;
    position: relative;
    border-radius: 20px;
    padding: 2.5rem 2rem 2rem;
    box-sizing: border-box;
}

/* The panel takes focus only so the dialog is announced; the theme's global :focus ring
   does not belong on it. The controls inside keep their focus styles. */
.pv-modal .pv-modal__content:focus,
.pv-modal .pv-modal__content:focus-visible {
    outline: none !important;
}

.pv-modal .pv-modal__close {
    position: absolute;
    right: .75em;
    top: .75em;
    padding: 4px;
    background: none;
    border: none;
    color: #000;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 300ms;
}

.pv-modal .pv-modal__close:hover {
    opacity: 0.6;
}

.pv-modal .pv-modal__close:focus-visible,
.pv-modal .pv-modal__secondary:focus-visible {
    outline: 2px solid #000;
    outline-offset: 2px;
}

.pv-modal .pv-modal__image {
    display: block;
    width: 100%;
    max-width: 375px;
    height: auto;
    margin: 0 0 1.75rem;
}

.pv-modal .pv-modal__heading {
    color: #000;
    font-size: calc(1.25rem * var(--fs-scale, 1));
    margin: 0 0 1rem;
}

.pv-modal .pv-modal__copy p {
    font-size: 1em;
    line-height: 1.4;
    margin: 0 0 1rem;
}

.pv-modal .pv-modal__copy p:last-child {
    margin-bottom: 0;
}

.pv-modal .pv-modal__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1rem 1.5rem;
    margin-top: 1.5rem;
}

.pv-modal .pv-modal__button {
    margin: 0;
}

.pv-modal .pv-modal__secondary {
    color: #000;
    font-weight: bold;
    text-decoration: underline;
    transition: color 300ms;
}

/* ECAM Yellow on hover, as on the phone link in lib/popups/popups.css. */
.pv-modal .pv-modal__secondary:hover {
    color: #f4af00;
}

@media only screen and (max-width: 781px) {
    .pv-modal .pv-modal__content {
        border-radius: 12px;
        padding: 2.5rem 1.25rem 1.25rem;
    }
}
