/*
Theme Name: MangaReader Child
Theme URI: https://themesia.com/mangareader-wordpress-theme
Template: mangareader
Author: Themesia
Author URI: https://themesia.com
Description: theme for read manga.
Tags: black,yellow,blue,purple,light,two-columns,right-sidebar,custom-header,custom-menu,featured-images
Version: 2.5.1
Updated: 2025-06-14 00:00:00

*/

/* =======================================
   Swiper slider visibility rules
   ---------------------------------------
   Show desktop slide on large screens and
   automatically switch to the mobile card
   when viewport width shrinks (tablets/mobiles)
   ======================================= */
.swiper-slide .desktop-slide {
    display: block;
}

.swiper-slide .mobile-slide {
    display: none;
}

@media (max-width: 1024px) {
    .swiper-slide .desktop-slide {
        display: none;
    }

    .swiper-slide .mobile-slide {
        display: block;
    }
}

.bigbanner {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    image-rendering: auto;
}

/* Lock screen & premium UI styling now in redesign.css and public.css */
/* Limit slider titles to one line with dots (...) */
/* Limit slider titles to one line with dots (...) on BOTH Desktop and Mobile */
.slider-wrapper .title,
.slider-wrapper .tt,
.slider-wrapper .entry-title,
.slider-wrapper .slidtit,
.swiper-slide .title,
.swiper-slide .tt,
.swiper-slide .entry-title,
.swiper-wrapper h1,
.swiper-wrapper h2,
.swiper-wrapper h3 {
    white-space: nowrap !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    display: block !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* ═══════════════════════════════════════════════════════════
   KM CHAPTER LIST WRAPPER & BUTTONS REDESIGN
   ═══════════════════════════════════════════════════════════ */

/* 1. Main Wrapper - Remove bulky boxes */
.bixbox.bxcl.epcheck {
    background: transparent !important;
    border: none !important;
    padding: 0 !important;
    box-shadow: none !important;
    margin-top: 20px !important;
}

/* 2. "All Chapters" Title */
.bixbox.bxcl .releases h2 {
    font-size: 1.3rem !important;
    font-weight: 800 !important;
    border-bottom: 2px solid rgba(171, 23, 63, 0.5) !important; /* KM Accent */
    padding-bottom: 8px !important;
    margin-bottom: 15px !important;
    display: inline-block !important;
    color: #fff !important;
}

/* 3. First & Newest Chapter Buttons (.lastend & .inepcx) */
.lastend {
    display: flex !important;
    gap: 12px !important;
    margin-bottom: 15px !important;
    flex-wrap: wrap !important;
    width: 100% !important;
}

.inepcx {
    flex: 1 !important;
    min-width: 140px !important;
}

.inepcx a {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 14px 12px !important;
    border-radius: 12px !important;
    text-decoration: none !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
}

.inepcx a:hover {
    background: rgba(171, 23, 63, 0.1) !important;
    border-color: #AB173F !important;
    transform: translateY(-2px) !important;
}

.inepcx a span {
    font-size: 12px !important;
    color: rgba(255, 255, 255, 0.5) !important;
    margin-bottom: 6px !important;
    display: block !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.inepcx a span.epcur {
    font-size: 15px !important;
    font-weight: 700 !important;
    color: #fff !important;
    margin-bottom: 0 !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
}

/* 4. Chapter Search Bar */
.search-chapter {
    margin-bottom: 20px !important;
    width: 100% !important;
}

.search-chapter input {
    width: 100% !important;
    background: rgba(0, 0, 0, 0.2) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    padding: 14px 16px !important;
    border-radius: 12px !important;
    font-size: 14px !important;
    transition: all 0.3s ease !important;
    box-sizing: border-box !important;
}

.search-chapter input:focus {
    border-color: #AB173F !important;
    outline: none !important;
    box-shadow: 0 0 0 3px rgba(171, 23, 63, 0.2) !important;
}

/* =========================================================
   === MOBILE FIXES (Force Full Width) ===
   ========================================================= */
@media (max-width: 768px) {
    /* Break the layout constraints so it takes 100% width */
    .second-half,
    .second-half .right-side,
    .second-half .left-side,
    .bixbox.bxcl.epcheck {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        display: block !important;
        float: none !important;
    }

    /* Shrink gaps for smaller screens */
    .lastend {
        gap: 8px !important;
    }

    /* Make buttons compact */
    .inepcx a {
        padding: 12px 8px !important;
        border-radius: 10px !important;
    }

    .inepcx a span {
        font-size: 11px !important;
        margin-bottom: 4px !important;
    }

    .inepcx a span.epcur {
        font-size: 13.5px !important;
    }
    
    /* Make search bar compact */
    .search-chapter input {
        padding: 12px 14px !important;
        font-size: 13px !important;
        border-radius: 10px !important;
    }
}


/* ═══════════════════════════════════════════════════════════
   KM SPOILER COMMENTS STYLING
   ═══════════════════════════════════════════════════════════ */
.km-is-spoiler {
    position: relative !important;
}

/* The content to blur */
.km-spoiler-hidden-content {
    filter: blur(8px) grayscale(50%) !important;
    opacity: 0.6 !important;
    pointer-events: none !important;
    user-select: none !important;
    transition: all 0.4s ease !important;
    max-height: 120px !important; /* Prevents huge spoiler images from taking up space */
    overflow: hidden !important;
}

/* The dark overlay box */
.km-spoiler-overlay {
    position: absolute !important;
    inset: 0 !important;
    z-index: 10 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 8px !important;
}

/* The Warning Badge */
.km-spoiler-warning {
    text-align: center !important;
    background: rgba(15, 15, 15, 0.95) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    padding: 16px 24px !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.6) !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 8px !important;
}

.km-spoiler-warning svg {
    color: #f59e0b !important; /* Warning Orange */
}

.km-spoiler-warning span {
    font-size: 13px !important;
    font-weight: 700 !important;
    color: #fff !important;
}

/* Reveal Button */
.km-reveal-spoiler {
    background: #AB173F !important;
    color: white !important;
    border: none !important;
    padding: 6px 16px !important;
    border-radius: 6px !important;
    font-size: 12px !important;
    cursor: pointer !important;
    font-weight: bold !important;
    transition: 0.2s !important;
    margin-top: 5px !important;
}

.km-reveal-spoiler:hover {
    background: #8e1234 !important;
    transform: scale(1.05) !important;
}

/* === WHEN REVEALED === */
.km-is-spoiler.revealed .km-spoiler-hidden-content {
    filter: none !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    user-select: auto !important;
    max-height: none !important;
}

.km-is-spoiler.revealed .km-spoiler-overlay {
    opacity: 0 !important;
    pointer-events: none !important;
    display: none !important;
}