
/* ************** */

.page-overlay {
    transition:
        /* Delay setting visibility to hidden to allow for fadeout transitions to play */
        visibility 0s linear 1s,
        /* Opacity goes fast when disappearing */
        opacity 0.4s linear  0s;
}

.page-overlay .overlay-content {
    pointer-events: none; /* Not supported natively in WF */
}

/*
If overlays are in use, and overlay is *not* visible, we hide the overlay.
If overlays are not in use, the default visibility rules apply (the overlay is visible).
*/
.pages[data-overlays="enabled"] .page:not(.overlay-visible) .page-overlay {
    opacity: 0;
}
.overlay-visible .page-overlay {
    opacity: 1;

    transition:
        /* When showing we want visibility set to visible straight away */
        visibility 0s linear 0s,
        /* Opacity goes slow when appearing */
        opacity 1s linear 0s;
}

/* Back button is only visible if overlays are in use, and shown. */
.overlay-visible .page-overlay .back-button {
    opacity: 1;
    transition: opacity 0.6s linear 2s;
}
