/* المسار: /wp-content/themes/astra-child/QB/qbv.css */

html { overflow-y: scroll !important; }

#qbv-app.qb-wrapper { 
    width: 100%; max-width: 100%; min-height: 85vh; background: #f8fafc;
    border: 1px solid #e2e8f0; border-radius: 12px; 
    box-shadow: 0 10px 40px rgba(0,0,0,0.08); overflow: hidden; margin: 20px 0;
    font-family: 'Segoe UI', Roboto, sans-serif; 
    display: flex; flex-direction: column; position: relative; 
    transition: min-height 0.2s ease; 
}

#qbv-app .qb-header-bar { 
    background: #0f2a3a;
    height: 110px; flex-shrink: 0; border-bottom: 5px solid #C5AB88; 
    display: flex; align-items: center; justify-content: space-between; padding: 0 40px;
}

#qbv-app .qb-title-section { display: flex; align-items: center; gap: 20px; }
#qbv-app .qb-icon-wrap { font-size: 32px; color: #C5AB88; }
#qbv-app .qb-text-wrap h3 { margin: 0; font-size: 24px; font-weight: 700; color: #fff; }
#qbv-app .qb-text-wrap span { font-size: 13px; color: rgba(255,255,255,0.6); text-transform: uppercase; letter-spacing: 1.5px; }

#qbv-back-btn { 
    background-color: rgba(255,255,255,0.1); width: 45px; height: 45px; 
    border-radius: 50%; cursor: pointer; transition: 0.2s; 
    display: flex; align-items: center; justify-content: center; 
}
#qbv-back-btn:hover { background-color: #C5AB88; transform: scale(1.1); color: #0f2a3a; }

#qbv-step-1.qb-placeholder { 
    flex-grow: 1; display: flex; flex-direction: column;
    align-items: center; justify-content: center; 
    background: linear-gradient(to bottom, #f8fafc, #fff); padding-bottom: 80px; 
}
.qb-ph-icon { font-size: 65px !important; color: #C5AB88; margin-bottom: 30px; }
#qbv-step-1 h4 { font-size: 24px; color: #0f2a3a; margin: 0 0 15px 0; font-weight: 800; }
#qbv-step-1 p { font-size: 16px; color: #64748b; margin-top: 0; }

.center-mode { margin-top: 40px; width: 100%; display: flex; justify-content: center; }
.wide-mode { width: 100%; max-width: 500px; text-align: left; }
.wide-mode label { 
    font-size: 14px; margin-bottom: 10px; display: block; text-align: left; 
    color: #0f2a3a; font-weight: 800; text-transform: uppercase;
    letter-spacing: 1px; padding-left: 5px; 
}
.wide-mode select { 
    width: 100%; height: 55px; font-size: 18px; text-align: center; font-weight: 600; 
    color-scheme: light; color: #0f2a3a; background-color: #fff; 
    border: 2px solid #cbd5e1; border-radius: 12px; 
    box-shadow: 0 4px 10px rgba(0,0,0,0.03); cursor: pointer; outline: none;
    transition: all 0.3s ease-in-out; 
}
.wide-mode select:hover { border-color: #C5AB88; }
.wide-mode select:focus { 
    border-color: #C5AB88;
    box-shadow: 0 0 0 4px rgba(197, 171, 136, 0.25); background-color: #fffbf2; 
}

.qb-main-ui { flex-grow: 1; display: flex; flex-direction: column; }
.qb-config-container { 
    width: 100%; max-width: 900px; margin: 40px auto; padding: 50px; 
    background: #fff; border-radius: 15px; border: 1px solid #e2e8f0;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05); 
}
#config-title { 
    text-align: center; color: #0f2a3a; font-size: 26px; font-weight: 800; margin-bottom: 40px; 
    text-transform: uppercase; border-bottom: 2px dashed #C5AB88; 
    padding-bottom: 15px; display: inline-block; width: 100%; 
}

.qb-filters-grid { display: grid; grid-template-columns: 1fr; gap: 25px; }
.qb-field { display: flex; flex-direction: column; }
.qb-field label { 
    font-size: 13px; color: #0f2a3a; text-transform: uppercase; font-weight: 800; 
    margin-bottom: 8px; border-left: 4px solid #C5AB88; padding-left: 10px; 
}
.qb-field select, .qb-field input { 
    color-scheme: light; background-color: #fff; border: 1px solid #cbd5e1;
    color: #0f2a3a; padding: 0 20px; height: 55px; border-radius: 10px; 
    font-size: 16px; font-weight: 500; outline: none; transition: all 0.3s ease;
    width: 100%; 
}
.qb-field select:hover, .qb-field input:hover { border-color: #C5AB88; }
.qb-field select:focus, .qb-field input:focus { border-color: #C5AB88; box-shadow: 0 0 0 3px rgba(197, 171, 136, 0.15); }
.qb-field select:disabled { background: #f1f5f9; border-color: #e2e8f0; color: #94a3b8; cursor: not-allowed; opacity: 1; }

.qb-typewriter-text { 
    font-family: 'Courier New', Courier, monospace; font-size: 13px; color: #C5AB88; 
    margin-top: 8px; margin-left: 5px; font-weight: 600;
    min-height: 20px; display: none; line-height: 1.4; 
    border-left: 2px solid #0f2a3a; padding-left: 8px; 
}

.qb-input-with-stat { display: flex; align-items: center; gap: 15px; }
.qb-input-with-stat input { flex: 1; }
.qb-stat-text { font-size: 16px; font-weight: 800; color: #166534; white-space: nowrap; transition: 0.3s; }

.center-btn { justify-content: center; margin-top: 50px; }
.qb-grid-btn { 
    background: #0f2a3a; color: #C5AB88; border: 2px solid #0f2a3a; font-weight: 700; font-size: 18px;
    cursor: pointer; border-radius: 10px; transition: all 0.3s ease; 
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 5px 15px rgba(15, 42, 58, 0.2); 
}
.qb-grid-btn.active:hover { 
    background: #fff; color: #0f2a3a; border-color: #C5AB88; 
    transform: translateY(-3px); box-shadow: 0 8px 20px rgba(15, 42, 58, 0.3); 
}

#qbv-questions-area { display: flex; flex-direction: column; height: 100%; }
.qb-test-layout { display: flex; flex: 1; height: 100%; }
.qb-test-toolbar { 
    background: #e2e8f0; height: 60px; display: flex; align-items: center; 
    justify-content: space-between; padding: 0 20px; border-bottom: 2px solid #cbd5e1; 
}

.qb-mode-indicator { display: flex; flex-direction: column; line-height: 1.2; position: relative; padding-left: 25px; }
.qb-mode-strip { 
    position: absolute; left: 0; top: 0; bottom: auto; width: 15px; height: 25px;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 75%, 0 100%); 
    box-shadow: 1px 1px 3px rgba(0,0,0,0.2); 
}
.qb-strip-study { background-color: #000; }
.qb-strip-revision { background-color: #f97316; } 
.qb-strip-enhance { background-color: #16a34a; } 
.qb-strip-test { background-color: #2563eb; } 
.qb-strip-exam { background-color: #dc2626; } 
.qb-mode-name { font-size: 12px; font-weight: 700; color: #166534; text-transform: uppercase; letter-spacing: 1px; } 
.qb-q-id { font-size: 14px; font-weight: 900; color: #0f2a3a; }

/* --- TOOLBAR ICONS --- */
.qb-tools-icons { display: flex; gap: 12px; align-items: center; flex: 1; justify-content: center; }
.qb-tools-icons img, .qb-tool-icon img, #qb-tools-placeholder img {
    height: 32px !important; width: auto !important; max-width: none !important;
    -webkit-filter: grayscale(100%) !important; filter: grayscale(100%) !important;
    opacity: 0.6 !important; transition: all 0.3s ease !important;
    cursor: pointer !important; margin: 0 !important; display: block !important;
}
.qb-tools-icons img:hover, .qb-tool-icon:hover img, #qb-tools-placeholder img:hover {
    -webkit-filter: grayscale(0%) !important; filter: grayscale(0%) !important;
    opacity: 1 !important; transform: scale(1.15) !important;
}
.qb-tool-icon.active img, .qb-tool-icon.seen-active img {
    -webkit-filter: grayscale(0%) !important; filter: grayscale(0%) !important;
    opacity: 1 !important; transform: scale(1.1) !important;
}

.qb-nav-arrows { display: flex; gap: 15px; }
.qb-nav-arrow { font-size: 28px; cursor: pointer; color: #0f2a3a; transition: 0.2s; }
.qb-nav-arrow:hover { color: #C5AB88; }

/* 🔥🔥 MAIN CONTENT (RELATIVE FOR ZOOM) 🔥🔥 */
.qb-main-content { 
    flex: 1; padding: 40px;
    overflow-y: auto; background: #cbd5e1; 
    display: flex; flex-direction: column; gap: 20px;
    position: relative; /* مهم جداً عشان التكبير يشتغل صح */
}

/* Question Text */
.qb-question-text { 
    background: #e2e8f0; border-radius: 15px; padding: 25px; font-size: 18px; font-weight: 500;
    color: #0f2a3a; box-shadow: 0 2px 5px rgba(0,0,0,0.05); 
    line-height: 1.6; white-space: normal; word-wrap: break-word;
}

/* Images Thumbnails - SEPARATE BLOCK & CLEAR BOTH */
#qbv-app .qb-q-img-wrapper { 
    margin: 20px 0 10px 0; display: block !important; clear: both !important;
    position: relative; max-width: 100%; 
}
#qbv-app img.qb-q-img-thumb { 
    width: 200px !important; height: 160px !important; max-width: 220px !important; 
    object-fit: cover !important; border-radius: 10px !important;
    border: 3px solid #fff !important; box-shadow: 0 5px 15px rgba(0,0,0,0.1) !important; 
    cursor: zoom-in; background: #fff; display: block !important; margin: 0 !important; 
}
#qbv-app img.qb-q-img-thumb:hover { 
    transform: scale(1.05); box-shadow: 0 10px 25px rgba(0,0,0,0.2) !important; border-color: #C5AB88 !important;
}

/* 🔥🔥 FULL AREA ZOOM PREVIEW 🔥🔥 */
/* يغطي مساحة qb-main-content بالكامل */
.qb-inline-preview-overlay { 
    position: absolute; 
    top: 0; left: 0; right: 0; bottom: 0; 
    width: 100%; height: 100%;
    background: rgba(241, 245, 249, 0.98); 
    z-index: 200; 
    display: flex; align-items: center; justify-content: center; 
    animation: fadeIn 0.25s ease-in-out; 
    backdrop-filter: blur(5px);
}
#qbv-app img.qb-inline-preview-img { 
    max-width: 90% !important; max-height: 90% !important; 
    width: auto !important; height: auto !important; 
    border-radius: 12px; box-shadow: 0 20px 60px rgba(0,0,0,0.25); 
    border: 4px solid #fff; object-fit: contain !important; 
    display: block !important;
}
.qb-inline-preview-close { 
    position: absolute; top: 20px; right: 20px; 
    width: 40px; height: 40px; background: #dc2626; color: #fff;
    border-radius: 50%; display: flex; align-items: center; justify-content: center; 
    font-size: 20px; cursor: pointer; box-shadow: 0 4px 10px rgba(0,0,0,0.2); 
    z-index: 201; border: 2px solid #fff;
}
.qb-inline-preview-close:hover { transform: scale(1.15); background: #b91c1c; }

/* Disabled Styles */
.qb-nav-arrow.disabled-nav, .qb-grid-item.disabled-nav { 
    pointer-events: none; opacity: 0.3; filter: grayscale(100%); cursor: not-allowed !important; 
}

/* Answers List */
.qb-answers-list { display: flex; flex-direction: column; gap: 10px; }
.qb-answer-option { 
    background: #e2e8f0; padding: 15px 20px; border-radius: 10px; cursor: pointer; 
    font-size: 16px; color: #334155; transition: 0.2s; 
    display: flex; align-items: center; border: 2px solid transparent;
}
.qb-answer-option:hover { background: #fff; }
.qb-answer-option.selected { background: #dcfce7 !important; font-weight: 700; color: #14532d; border-color: #22c55e; }
.qb-answer-option.correct { background: #dcfce7 !important; color: #14532d !important; border-color: #22c55e !important; font-weight: 700; }
.qb-answer-option.wrong { background: #fee2e2 !important; color: #991b1b !important; border-color: #ef4444 !important; opacity: 0.8; font-weight: 700; }

/* Sidebar */
.qb-sidebar { 
    width: 280px; background: #e2e8f0; border-left: 2px solid #cbd5e1; 
    display: flex; flex-direction: column; padding: 20px;
}
.qb-timer-box { 
    text-align: center; font-size: 22px; font-weight: 800; color: #0f2a3a; 
    margin-bottom: 20px; background: #fff; padding: 10px; border-radius: 10px; border: 1px solid #C5AB88; 
}
.qb-grid-title { text-align: center; font-weight: 800; color: #0f2a3a; margin-bottom: 10px; text-transform: uppercase; }
.qb-q-grid { 
    display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; 
    overflow-y: auto; padding-bottom: 20px; 
}
.qb-grid-item { 
    aspect-ratio: 1; background: #fff; border: 1px solid #cbd5e1;
    display: flex; align-items: center; justify-content: center; 
    font-weight: 700; font-size: 14px; cursor: pointer; color: #334155; border-radius: 4px; 
}
.qb-grid-item:hover { border-color: #0f2a3a; }
.qb-grid-item.active { background: #64748b; color: #fff; border-color: #0f2a3a; }
.qb-grid-item.answered { background: #0f2a3a !important; color: #fff !important; border-color: #0f2a3a !important; }

.qb-sidebar-footer { margin-top: auto; display: flex; gap: 10px; }
.qb-mini-btn { 
    flex: 1; padding: 10px; border-radius: 20px; border: 2px solid #0f2a3a;
    font-weight: 700; cursor: pointer; text-align: center; font-size: 13px; text-transform: uppercase; 
}
.btn-finish { background: #fff; color: #0f2a3a; }
.btn-finish:hover { background: #0f2a3a; color: #fff; }
.btn-cancel { background: #fee2e2; color: #b91c1c; border-color: #b91c1c; }

.qb-toast { 
    position: absolute; bottom: 40px; left: 50%; transform: translateX(-50%);
    background: #333; color: #fff; padding: 15px 30px; border-radius: 40px; 
    font-size: 15px; font-weight: 600; opacity: 0; pointer-events: none; transition: 0.3s; z-index: 200; 
}
.qb-toast.show { opacity: 1; transform: translateX(-50%) translateY(-10px); }
.qb-toast.error { background: #b91c1c; }

/* Results */
.qb-result-wrapper { 
    background: #fff; border-radius: 30px; box-shadow: 0 10px 40px rgba(0,0,0,0.1); 
    padding: 40px; font-family: 'Segoe UI', sans-serif; color: #000; overflow: hidden; margin: 20px;
}
.qb-result-wrapper.res-passed { background: #f0fdf4; border: 1px solid #bbf7d0; } 
.qb-result-wrapper.res-failed { background: #fef2f2; border: 1px solid #fecaca; } 
.qb-res-header { display: flex; justify-content: space-between; position: relative; margin-bottom: 20px; z-index: 2; }
.qb-res-info { flex: 1; position: relative; }
.qb-res-title-bar { display: flex; align-items: center; margin-bottom: 5px; }
.qb-blue-tag { width: 10px; height: 40px; background-color: #2563eb; margin-right: 15px; }
.qb-res-title-bar h1 { font-size: 32px; font-weight: 800; margin: 0; color: #000; text-transform: capitalize; }
.qb-res-meta { font-size: 14px; color: #555; margin-left: 25px; margin-bottom: 20px; }
.qb-res-course-title { 
    font-size: 24px; font-weight: 500; color: #000; margin-bottom: 10px; 
    border-bottom: 1px dotted #999; padding-bottom: 10px; display: inline-block; width: 100%; 
}
.qb-res-score-row { display: flex; align-items: baseline; gap: 30px; margin-top: 10px; }
.qb-res-score-txt { font-size: 28px; font-weight: 800; color: #000; }
.qb-res-percent { font-size: 36px; font-weight: 900; }
.qb-res-watermark { 
    position: absolute; top: 50%; left: 50%; width: 500px; height: 350px;
    transform: translate(-50%, -50%) rotate(-15deg); background-repeat: no-repeat; 
    background-size: contain; background-position: center; opacity: 0.15; pointer-events: none; z-index: 0; 
}
.qb-res-profile { 
    width: 220px; text-align: center; background: transparent; padding: 15px; align-self: flex-start; z-index: 2; 
}
.qb-res-profile img { 
    width: 100px; height: 100px; border-radius: 50%; object-fit: cover; 
    margin-bottom: 10px; border: none; box-shadow: none; background: transparent; 
}
.qb-res-name { font-size: 18px; font-weight: 800; color: #0f2a3a; margin-bottom: 5px; }
.qb-res-sub { font-size: 13px; color: #555; line-height: 1.3; font-weight: 600; }
.qb-res-divider { border: 0; border-top: 2px dotted #aaa; margin: 30px 0; position: relative; z-index: 2; }

/* Circular Timer */
.qb-q-timer-wrap { display: flex; flex-direction: column; align-items: center; margin-bottom: 15px; }
.qb-circular-timer { 
    width: 80px; height: 80px; border-radius: 50%; 
    background: conic-gradient(#0f2a3a 0deg, #e2e8f0 0deg); 
    display: flex; align-items: center; justify-content: center; 
    position: relative; box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
}
.qb-circular-inner { 
    width: 65px; height: 65px; background: #fff; border-radius: 50%;
    display: flex; align-items: center; justify-content: center; 
    font-size: 18px; font-weight: 900; color: #0f2a3a; position: relative; z-index: 2; 
}
.qb-perf-text { 
    font-size: 12px; font-weight: 700; margin-top: 5px; color: #166534; 
    text-align: center; line-height: 1.4; 
}

/* 🔥🔥 LOUNGE MODAL (Default) 🔥🔥 */
.qb-lounge-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 23, 42, 0.7); backdrop-filter: blur(4px);
    z-index: 3000; display: flex; align-items: center; justify-content: center;
    animation: fadeIn 0.3s ease;
}
.qb-lounge-box {
    width: 90%; max-width: 700px; height: 85%; background: #f8fafc;
    border-radius: 12px; display: flex; flex-direction: column; overflow: hidden;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3); border: 1px solid #cbd5e1;
}
.qb-lounge-header {
    height: 55px; background: #0f2a3a; color: #fff;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; flex-shrink: 0; border-bottom: 3px solid #C5AB88;
}
.qb-lounge-title { display: flex; align-items: center; gap: 10px; }
.qb-lounge-title img { height: 26px; width: auto; filter: brightness(0) invert(1); }
.qb-lounge-title span { font-weight: 700; font-size: 16px; letter-spacing: 0.5px; }
#qbv-lounge-close {
    background: none; border: none; color: #fff; font-size: 18px; cursor: pointer;
    opacity: 0.8; transition: 0.2s;
}
#qbv-lounge-close:hover { opacity: 1; transform: scale(1.1); color: #C5AB88; }

.qb-lounge-body { 
    flex: 1; overflow-y: auto; padding: 20px;
    display: flex; flex-direction: column; gap: 20px; background: #fff;
    direction: ltr !important; text-align: left !important;
}
.qb-lounge-explanation-area {
    background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; 
    padding: 0; overflow: hidden; flex-shrink: 0;
}
.qb-expl-label {
    background: #C5AB88 !important; color: #fff; font-size: 11px; font-weight: 800;
    text-transform: uppercase; padding: 5px 15px; letter-spacing: 1px;
}
#qbv-lounge-explanation-content { padding: 15px; font-size: 14px; color: #334155; line-height: 1.5; }
.qb-lounge-stream { flex: 1; display: flex; flex-direction: column; gap: 15px; }

.qb-lounge-footer {
    background: #e2e8f0; padding: 15px; border-top: 1px solid #cbd5e1; direction: ltr !important;
}
#qbv-reply-indicator {
    background: #cbd5e1; font-size: 11px; padding: 4px 10px; border-radius: 4px;
    margin-bottom: 8px; display: flex; justify-content: space-between;
}
#qbv-cancel-reply { cursor: pointer; color: #b91c1c; }
.qb-lounge-input-row { display: flex; gap: 10px; }
#qbv-lounge-input {
    flex: 1; border-radius: 20px; border: 1px solid #cbd5e1; padding: 0 15px; height: 40px; outline: none;
}
#qbv-lounge-input:focus { border-color: #C5AB88; }
#qbv-lounge-send {
    width: 40px; height: 40px; border-radius: 50%; background: #0f2a3a; color: #fff;
    border: none; cursor: pointer; flex-shrink: 0; display: flex; align-items: center; justify-content: center;
}
#qbv-lounge-send:hover { background: #C5AB88; color: #0f2a3a; }

.lounge-conversation-tree { 
    margin-left: 25px; border-left: 2px solid #e2e8f0;
    padding-left: 15px; margin-top: 10px; display: flex; flex-direction: column; gap: 10px; 
}
.qb-lounge-row { display: flex; gap: 12px; align-items: flex-start; width: 100%; }
.qb-lounge-avatar { 
    width: 38px; height: 38px; border-radius: 50% !important; object-fit: cover; 
    border: 1px solid #cbd5e1; flex-shrink: 0; overflow: hidden;
}
.qb-lounge-avatar img { border-radius: 50% !important; width: 100%; height: 100%; }
.qb-lounge-avatar.invisible-avatar { visibility: hidden; border: none; box-shadow: none; }
.qb-lounge-bubble {
    padding: 12px 16px; border-radius: 12px; position: relative; max-width: 85%; font-size: 13px; line-height: 1.5;
}
.msg-admin .qb-lounge-bubble { 
    background: rgba(254, 242, 242, 0.95); border: 1px solid #fecaca; color: #991b1b; border-left: 4px solid #ef4444;
}
.msg-user .qb-lounge-bubble { 
    background: rgba(220, 252, 231, 0.95); color: #14532d; border: 1px solid #86efac;
}
.msg-me .qb-lounge-bubble { 
    background: rgba(224, 242, 254, 0.95); color: #0369a1; border: 1px solid #7dd3fc;
}
.qb-lounge-author { font-weight: 800; font-size: 11px; margin-bottom: 4px; display: block; opacity: 0.9; }
.qb-lounge-date { font-size: 9px; opacity: 0.6; font-weight: 400; margin-left: 5px; }
.qb-reply-btn { 
    font-size: 10px; font-weight: 700; opacity: 0.7; margin-top: 5px; cursor: pointer; display: inline-block; 
}
.qb-reply-btn:hover { text-decoration: underline; opacity: 1; }

/* ---------------------------------------------------- */
/* 🔥🔥🔥 FIXED: EBOOK MODAL (High Z-Index & Overlay) 🔥🔥🔥 */
/* ---------------------------------------------------- */
#qbv-ebook-modal {
    position: fixed !important; 
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 2147483647 !important; /* أعلى طبقة ممكنة */
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(5px);
    display: flex;
    align-items: center;
    justify-content: center;
}

.qb-ebook-popup {
    width: 85%; max-width: 800px; height: 90%;
    background-color: #fcfbf7;
    background-image: repeating-linear-gradient(0deg, transparent, transparent 2px, #e3dacd 2px, #e3dacd 3px);
    background-size: 100% 4px; border-radius: 6px;
    border: 6px double #d4c5b0;
    outline: 1px solid #f0e6d2; 
    box-shadow: inset 0 0 80px rgba(160, 140, 110, 0.35), 0 20px 60px rgba(0,0,0,0.6), 0 0 0 5px rgba(255, 255, 255, 0.1);
    display: flex; flex-direction: column; overflow: hidden;
    position: relative;
}

.qb-ebook-header {
    height: 50px; background: #0f2a3a; color: #fff;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px; flex-shrink: 0; border-bottom: 3px solid #C5AB88;
}
.qb-ebook-header h4 { 
    margin: 0; font-size: 15px; font-weight: 700; color: #fff; text-transform: uppercase; letter-spacing: 1px; 
}

/* 🔥 Close Button High Priority 🔥 */
#qbv-ebook-close { 
    background: none; border: none; color: #fff; font-size: 20px; cursor: pointer;
    transition: 0.2s; opacity: 0.8; 
    z-index: 2147483650 !important; /* أعلى من أي شيء */
    position: relative;
    pointer-events: auto !important; /* ضمان النقر */
}
#qbv-ebook-close:hover { color: #C5AB88; transform: scale(1.1); opacity: 1; }

.qb-ebook-body {
    flex: 1; overflow-y: auto; padding: 50px;
    font-family: 'Georgia', 'Times New Roman', serif;
    font-size: 17px; line-height: 1.8; color: #2c3e50;
    text-align: left; direction: ltr;
}

.eb-book-slider h1 { 
    font-size: 26px; border-bottom: 2px solid #e2d9cc; padding-bottom: 15px; 
    margin-bottom: 25px; color: #0f2a3a; font-family: 'Segoe UI', sans-serif; font-weight: 800; 
}
.eb-book-slider h2 { 
    font-size: 21px; margin-top: 35px; color: #0f2a3a; border-left: 4px solid #C5AB88; padding-left: 10px;
}
.eb-book-slider p { margin-bottom: 18px; text-align: justify; }
.eb-book-slider img { 
    max-width: 100%; height: auto; display: block; margin: 30px auto;
    border: 5px solid #fff; box-shadow: 0 5px 15px rgba(0,0,0,0.1); 
}

/* 🔥 SECURITY & CLEANUP: HIDE ICONS & WRAPPERS IN EBOOK 🔥 */
#qbv-ebook-content .lounge-trigger,
#qbv-ebook-content .lounge-item-card,
#qbv-ebook-content .elementor-icon, /* Target Elementor Wrappers */
#qbv-ebook-content .elementor-icon-wrapper, /* Target Elementor Wrappers */
#qbv-ebook-content .elementor-widget-icon, /* Target Elementor Wrappers */
#qbv-ebook-content .qb-icon,
#qbv-ebook-content .lounge-qb-icon,
#qbv-ebook-content .question-icon,
#qbv-ebook-content .fa-question,
#qbv-ebook-content a[href*="question"],
#qbv-ebook-content img[src*="qb.png"],
#qbv-ebook-content img[src*="ebook.png"],
#qbv-ebook-content img[src*="icon"] {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    width: 0 !important; height: 0 !important;
}