/* EduBook — chỉnh giao diện PC 2026-11-05. Chỉ thêm lớp mới, không đổi layout cũ. */

/* 1. Thanh môn học: trên PC xuống dòng để thấy đủ mọi môn (không cuộn ngang, không bị cắt). */
@media (min-width: 1024px) {
  #subject-buttons-row, #series-buttons-row { flex-wrap: wrap; overflow: visible; }
}

/* 4. Bỏ khối danh mục/sách mới cuối trang và dòng tổng số học liệu. */
body > nav[aria-label="Danh mục sách"] { display: none !important; }
#catalog-status:empty { display: none; }

/* 3. Phân trang. */
.books-pager { display: flex; flex-direction: column; align-items: center; gap: 10px; margin: 28px 0 8px; }
.books-pager[hidden] { display: none !important; }
.books-pager-info { font-size: 12px; font-weight: 700; color: #64748b; }
.books-pager-list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }
.books-pager button { min-width: 40px; height: 40px; padding: 0 12px; border: 2px solid #e2e8f0; border-radius: 8px; background: #fff; color: #334155; font-size: 13px; font-weight: 800; cursor: pointer; }
.books-pager button:hover:not(:disabled):not([aria-current="page"]) { border-color: #3b82f6; color: #1d4ed8; background: #eff6ff; }
.books-pager button[aria-current="page"] { background: #2563eb; border-color: #1e40af; color: #fff; cursor: default; }
.books-pager button:disabled { opacity: .45; cursor: not-allowed; }
.books-pager button:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.books-pager .gap { min-width: 24px; text-align: center; color: #94a3b8; font-weight: 800; }

/* 2. Ảnh đọc thử trong popup: lưới ảnh nhỏ + trình xem phóng to có tiến/lùi. */
.preview-hint { font-size: 12px; font-weight: 600; color: #64748b; margin: 0; }
.preview-thumb { position: relative; display: block; padding: 0; border: 1px solid #cbd5e1; border-radius: 8px; background: #fff; overflow: hidden; cursor: zoom-in; }
.preview-thumb:hover { border-color: #3b82f6; outline: 2px solid #bfdbfe; }
.preview-thumb:focus-visible { outline: 3px solid #3b82f6; outline-offset: 2px; }
.preview-thumb { aspect-ratio: 480 / 674; background: #f1f5f9; }
.preview-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.preview-thumb .thumb-no { position: absolute; left: 6px; bottom: 6px; padding: 1px 8px; border-radius: 999px; background: rgba(15,23,42,.82); color: #fff; font-size: 11px; font-weight: 800; }

.preview-lightbox { position: fixed; inset: 0; z-index: 70; display: flex; flex-direction: column; background: rgba(2,6,23,.95); color: #fff; }
.lb-bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 1px solid rgba(255,255,255,.14); }
.lb-count { flex: none; padding: 3px 12px; border-radius: 999px; background: #2563eb; font-size: 13px; font-weight: 800; }
.lb-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; font-weight: 700; color: #e2e8f0; }
.lb-close { flex: none; height: 40px; padding: 0 16px; border: 1px solid rgba(255,255,255,.3); border-radius: 8px; background: transparent; color: #fff; font-size: 13px; font-weight: 800; cursor: pointer; }
.lb-close:hover { background: rgba(255,255,255,.14); }
.lb-stage { position: relative; flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; gap: 12px; padding: 12px 16px; }
.lb-figure { margin: 0; flex: 1; min-width: 0; height: 100%; display: flex; align-items: center; justify-content: center; overflow: auto; }
.lb-img { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; margin: auto; border-radius: 4px; background: #fff; }
.lb-img.is-loading { min-width: 240px; min-height: 320px; opacity: .35; }
.lb-error { color: #fecaca; font-weight: 700; }
.lb-nav { flex: none; width: 52px; height: 72px; border: 1px solid rgba(255,255,255,.3); border-radius: 10px; background: rgba(255,255,255,.08); color: #fff; font-size: 34px; line-height: 1; cursor: pointer; }
.lb-nav:hover:not(:disabled) { background: rgba(255,255,255,.22); }
.lb-nav:disabled { opacity: .25; cursor: not-allowed; }
.lb-close:focus-visible, .lb-nav:focus-visible, .lb-thumb:focus-visible { outline: 3px solid #93c5fd; outline-offset: 2px; }
.lb-strip { display: flex; gap: 8px; padding: 10px 16px 14px; overflow-x: auto; border-top: 1px solid rgba(255,255,255,.14); justify-content: safe center; }
.lb-thumb { flex: none; width: 62px; height: 84px; padding: 0; border: 2px solid transparent; border-radius: 6px; background: #fff; overflow: hidden; cursor: pointer; opacity: .6; }
.lb-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.lb-thumb:hover { opacity: 1; }
.lb-thumb[aria-current="true"] { border-color: #60a5fa; opacity: 1; }
@media (max-width: 767px) {
  .lb-nav { width: 40px; height: 56px; font-size: 28px; }
  .lb-stage { padding: 8px; gap: 6px; }
}
