/* ═══════════════════════════════════════════════
   MangaZen Ad Security — Frontend CSS
   ═══════════════════════════════════════════════ */

/* ── Responsive visibility ─────────────────── */
.mz-desktop-only { display: block; }
.mz-mobile-only  { display: none; }

@media (max-width: 767px) {
    .mz-desktop-only { display: none !important; }
    .mz-mobile-only  { display: block !important; }
}

/* ── Ad unit base ──────────────────────────── */
.mz-ad-unit {
    text-align: center;
    margin: 12px auto;
    overflow: hidden;
    max-width: 100%;
}

.mz-ad-unit iframe,
.mz-ad-unit img {
    max-width: 100%;
    height: auto;
}

/* ── Sticky footer ─────────────────────────── */
#mz-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: rgba(0, 0, 0, 0.85);
    text-align: center;
    padding: 3px 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
    max-height: 96px;
    overflow: hidden;
}

/* Remove extra margin from ad units inside sticky footer */
#mz-sticky-footer .mz-ad-unit {
    margin: 0 auto;
}

/* Constrain iframe inside sticky footer */
#mz-sticky-footer iframe {
    max-height: 90px;
    display: block;
    margin: 0 auto;
}

/* Desktop: push page content above the 728x90 sticky bar */
body.mz-has-sticky {
    padding-bottom: 100px;
}

/* Mobile: smaller sticky = 320x50, less body padding */
@media (max-width: 767px) {
    #mz-sticky-footer {
        max-height: 56px;
        padding: 2px 0;
    }
    #mz-sticky-footer iframe {
        max-height: 50px;
    }
    body.mz-has-sticky {
        padding-bottom: 60px;
    }
}

#mz-sticky-footer.mz-hidden {
    transform: translateY(100%);
    pointer-events: none;
}

#mz-sticky-close {
    position: absolute;
    top: -20px;
    right: 10px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 50% 50% 0 0;
    width: 26px;
    height: 20px;
    font-size: 14px;
    line-height: 1;
    cursor: pointer;
    z-index: 100000;
}
#mz-sticky-close:hover {
    background: #e74c3c;
}

/* ── Banner positions ──────────────────────── */
.mz-banner-top-reader,
.mz-banner-bottom-reader {
    margin: 16px auto;
}

.mz-banner-between-pages {
    margin: 20px auto;
    padding: 4px 0;
}

.mz-banner-sidebar {
    margin-bottom: 20px;
}

/* ── Native in-reader ──────────────────────── */
.mz-native-inreader {
    margin: 16px auto;
    padding: 8px;
    background: rgba(0,0,0,0.02);
    border-radius: 4px;
}

/* ── Chapter banner images ─────────────────── */
.mz-chapter-banner {
    text-align: center;
    margin: 10px auto;
}
.mz-chapter-banner img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* ── Adblock detection ─────────────────────── */
#mz-adblock-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    background: #e74c3c;
    color: #fff;
    text-align: center;
    padding: 14px 20px;
    font-size: 15px;
    font-family: sans-serif;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}
#mz-adblock-banner button {
    margin-left: 16px;
    background: #fff;
    color: #e74c3c;
    border: none;
    padding: 6px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

#mz-adblock-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 999999;
    background: rgba(0,0,0,0.75);
    display: flex;
    align-items: center;
    justify-content: center;
}
#mz-adblock-modal {
    background: #fff;
    color: #333;
    padding: 40px;
    border-radius: 12px;
    max-width: 480px;
    text-align: center;
    font-family: sans-serif;
    box-shadow: 0 4px 30px rgba(0,0,0,0.3);
}
#mz-adblock-modal h2 {
    margin: 0 0 12px;
    font-size: 1.5em;
}
#mz-adblock-modal p {
    margin: 0 0 20px;
    font-size: 1.05em;
    color: #555;
}
#mz-adblock-modal button {
    background: #e74c3c;
    color: #fff;
    border: none;
    padding: 10px 30px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 1em;
}

/* Blur mode */
.mz-adblock-blur {
    filter: blur(8px) !important;
    pointer-events: none !important;
    user-select: none !important;
}

/* ── Lazy load animation ───────────────────── */
.mz-lazy-loading {
    opacity: 0;
    transition: opacity 0.4s ease;
}
.mz-lazy-loaded {
    opacity: 1;
}

/* ── Homepage banner slots ─────────────────── */
.mz-banner-before-list,
.mz-banner-after-list {
    margin: 16px auto;
    text-align: center;
}
