/* =========================================================================
   BASE MODAL OVERLAY (DESKTOP & UNIVERSAL)
   ========================================================================= */

/* ============================================================
 * KARLALYN HOMEPAGE & CATALOG PREMIUM UI/UX STYLESHEET
 * Modular, Clean, Zero-Inline CSS Architecture
 * ============================================================ */

/* 1. Continue Reading Strip (Pita Lanjutkan Membaca) */
.continue-reading-strip {
    display: none;
    margin: 0 0 16px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #eff6ff 100%);
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 10px 16px;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.06);
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    transition: all 0.25s ease;
}
.continue-reading-strip:hover {
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.1);
    border-color: #93c5fd;
}
.cr-content {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}
.cr-icon {
    font-size: 1.25rem;
    flex-shrink: 0;
}
.cr-text-wrap {
    font-size: 0.88rem;
    color: #1e293b;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.cr-label {
    color: #64748b;
    font-weight: 500;
}
.cr-book-title {
    color: #0f172a;
    margin-left: 4px;
}
.cr-chapter-text {
    color: #2563eb;
    font-weight: 600;
    margin-left: 6px;
}
.cr-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}
.cr-btn-primary {
    background: #2563eb;
    color: #ffffff !important;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.25);
    transition: background 0.2s, transform 0.2s;
}
.cr-btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}
.cr-btn-close {
    background: none;
    border: none;
    font-size: 1.15rem;
    color: #94a3b8;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
    transition: color 0.2s;
}
.cr-btn-close:hover {
    color: #475569;
}

/* 2. 3D Tactile Cover & Card Lift */
.book-card {
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.28s cubic-bezier(0.16, 1, 0.3, 1) !important;
}
.book-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 16px 30px -8px rgba(15, 23, 42, 0.12), 0 4px 10px -2px rgba(15, 23, 42, 0.04) !important;
}
.book-cover-wrap {
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1) !important;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12), inset 1px 0 2px rgba(255, 255, 255, 0.2) !important;
    border-radius: 6px !important;
    overflow: hidden !important;
}
.book-card:hover .book-cover-wrap {
    transform: scale(1.02) !important;
    box-shadow: 0 10px 22px -4px rgba(0, 0, 0, 0.22) !important;
}

/* 3. Audio Badge di Card Buku */
.book-audio-badge {
    font-size: 0.68rem;
    padding: 2px 7px;
    background: #fef3c7;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 9999px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    letter-spacing: 0.01em;
}

/* 4. Ambient Glow pada Trending Slider */
#trending-slider-container {
    position: relative !important;
}
#trending-slider-container::before {
    content: "" !important;
    position: absolute !important;
    top: 50% !important;
    left: 120px !important;
    width: 280px !important;
    height: 280px !important;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.18) 0%, rgba(225, 29, 72, 0.08) 50%, transparent 70%) !important;
    transform: translateY(-50%) !important;
    filter: blur(40px) !important;
    pointer-events: none !important;
    z-index: 0 !important;
}


/* Sisa selector lama QuickView & Lightbox telah dipusatkan secara bersih ke karlalyn-quick-view.css */

@media (max-width: 768px) {
    .qv-modal-container {
        padding: 2px !important;
        gap: 4px !important;
    }
    .qv-modal-container > div:first-child {
        width: 95px !important;
        min-width: 95px !important;
        max-width: 95px !important;
        margin: 0 auto 3px auto !important;
    }
    .qv-stats-box {
        padding: 3px 6px !important;
        margin-bottom: 4px !important;
        gap: 2px 6px !important;
    }
    /* kqv-actions-row dipusatkan di karlalyn-quick-view.css */
}


/* --- MOBILE ENHANCEMENT: CONTINUE READING STRIP TIDAK TERPOTONG --- */
@media (max-width: 640px) {
    .continue-reading-strip {
        flex-direction: column !important;
        align-items: stretch !important;
        padding: 12px 14px !important;
        gap: 10px !important;
    }
    .cr-content {
        align-items: flex-start !important;
        gap: 8px !important;
        width: 100% !important;
    }
    .cr-text-wrap {
        white-space: normal !important;
        line-height: 1.4 !important;
        word-break: break-word !important;
    }
    .cr-label {
        display: inline !important;
        margin-right: 4px !important;
    }
    .cr-book-title {
        display: inline !important;
        font-weight: 700 !important;
    }
    .cr-chapter-text {
        display: inline !important;
    }
    .cr-actions {
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
        width: 100% !important;
        margin-top: 4px !important;
        gap: 10px !important;
    }
    .cr-btn-primary {
        flex: 1 !important;
        text-align: center !important;
        padding: 8px 16px !important;
        font-size: 0.88rem !important;
    }
    .cr-btn-close {
        width: 32px !important;
        height: 32px !important;
        border-radius: 50% !important;
        background: rgba(255, 255, 255, 0.08) !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-size: 1.2rem !important;
        flex-shrink: 0 !important;
    }
}
