/* OFWZ dynamic covers — opt-in only */

#book .sheet.ofwz-dynamic-cover {
    background:#080808 !important;
    overflow:hidden;
}

#book .sheet.ofwz-dynamic-cover
.ofwz-fit-content {
    position:relative !important;
    inset:auto !important;
    padding:0 !important;
    margin:0 !important;
    width:100% !important;
    aspect-ratio:3/4;
    overflow:hidden !important;
    background:#080808 !important;
}

#book.natural-book
.sheet.ofwz-dynamic-cover .ofwz-fit-content,
#book.enhanced
.sheet.ofwz-dynamic-cover .ofwz-fit-content {
    position:absolute !important;
    inset:0 0 4% 0 !important;
    height:auto !important;
    aspect-ratio:auto;
}

#book .ofwz-dynamic-cover
.ofwz-cover-background {
    position:absolute !important;
    inset:0 !important;
    width:100% !important;
    height:100% !important;
    padding:0 !important;
    margin:0 !important;
    max-height:none !important;
    background:#080808 !important;
    overflow:hidden !important;
}

#book .ofwz-dynamic-cover
.ofwz-cover-background img,
#book .ofwz-dynamic-cover
.ofwz-cover-background video,
#book .ofwz-dynamic-cover
.ofwz-cover-background > a {
    display:block !important;
    width:100% !important;
    height:100% !important;
    max-width:none !important;
    max-height:none !important;
    margin:0 !important;
    padding:0 !important;
    object-fit:cover !important;
}

#book .ofwz-dynamic-cover
.ofwz-cover-background .advertiser-link {
    display:none !important;
}

#book .ofwz-cover-overlay {
    position:absolute;
    inset:0;
    display:flex;
    flex-direction:column;
    justify-content:flex-end;
    padding:7%;
    z-index:3;
    pointer-events:none;
    background:linear-gradient(
        to bottom,
        rgba(0,0,0,.35),
        transparent 28%,
        rgba(0,0,0,.12) 45%,
        rgba(0,0,0,.88)
    );
}

#book .ofwz-video-background
.ofwz-cover-overlay {
    bottom:50px;
}

#book .ofwz-cover-overlay[data-position="top"] {
    justify-content:flex-start;
    background:linear-gradient(
        to bottom,
        rgba(0,0,0,.85),transparent
    );
}

#book .ofwz-cover-overlay[data-position="center"] {
    justify-content:center;
    background:rgba(0,0,0,.26);
}

#book .ofwz-cover-overlay-text {
    width:100%;
    max-height:100%;
    overflow:auto;
    color:#fff;
    text-align:center;
    pointer-events:auto;
}

#book .ofwz-dynamic-cover
.ofwz-cover-overlay-text * {
    color:#fff !important;
    text-shadow:0 2px 8px rgba(0,0,0,.6);
}

#book .ofwz-dynamic-cover
.ofwz-cover-overlay-text .page-brand {
    font-family:Arial,sans-serif !important;
    font-size:clamp(34px,7vw,78px) !important;
    font-weight:800 !important;
    letter-spacing:-3px !important;
    background:none !important;
    border:none !important;
}

#book .ofwz-dynamic-cover
.ofwz-cover-overlay-text h2 {
    font-family:Georgia,serif !important;
    font-size:clamp(21px,4vw,42px) !important;
    line-height:1.08 !important;
    margin:12px 0 !important;
}

#book .ofwz-dynamic-cover
.ofwz-cover-overlay-text .page-body {
    font-size:clamp(12px,1.7vw,17px) !important;
    line-height:1.45 !important;
    column-count:1 !important;
    overflow-wrap:anywhere;
}

#book .ofwz-cover-destination {
    display:inline-block;
    margin-top:14px;
    padding:10px 18px;
    background:#163d32;
    color:white !important;
    border:1px solid rgba(255,255,255,.65);
    text-decoration:none;
    font:600 12px Arial,sans-serif;
    border-radius:3px;
    pointer-events:auto;
}

#book .ofwz-dynamic-cover .page-number {
    color:white !important;
    z-index:5;
}
