/* =====================================================================
   Question Bank shell (layouts/qb): the website header and footer with the
   learner sidebar beside the page. Colours come from variables only, so the
   light reading mode needs no generated rules for this file.
   ===================================================================== */

/* ph-student.css also sets its palette on :root, which would recolour the
   site header and footer here. Put the public site values back on the page
   root; the .qbl wrapper still gets the student values from .stu-body. */
html:not([data-theme="light"]) {
  --navy: #7B2CF5; --navy-2: #6A1FE0; --navy-3: #0A0118;
  --teal: #B86BFF; --teal-2: #D18BFF; --teal-soft: rgba(184, 107, 255, .12);
  --lav: var(--ph-surface2); --lav-2: var(--ph-line); --t-purple-soft: rgba(138, 43, 245, .16);
}

.qbl.stu-body { background: none; }
.qbl { width: 100%; max-width: 1440px; margin: 0 auto; padding: 20px 20px 48px; }
.qbl-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.qbl-main { min-width: 0; }
.qbl-side { display: none; }

/* The mock exam bar sat above the student tab bar; there is none here. */
@media (max-width: 759px) { .stu-body.qbl .qx-mock .tp-side { bottom: 0; } }

/* Phones and tablets: the sidebar is hidden (the site drawer covers it), so the main
   Question Bank sections sit in a quiet underlined row above the page. */
.qbl-strip { display: flex; gap: 18px; overflow-x: auto; scrollbar-width: none; margin: -8px -20px 18px; padding: 0 20px; border-bottom: 1px solid var(--ph-line, #e7e9ee); }
.qbl-strip::-webkit-scrollbar { display: none; }
.qbl-strip a { flex: none; display: inline-flex; align-items: center; min-height: 44px; border-bottom: 2px solid transparent; margin-bottom: -1px; color: var(--ph-muted, #6b7280); font-size: .9rem; font-weight: 600; white-space: nowrap; transition: color .15s, border-color .15s; }
.qbl-strip a:hover { color: var(--ph-white, #111827); }
.qbl-strip a.active { color: var(--ph-white, #111827); border-bottom-color: var(--ph-magenta, #b51d21); }

@media (min-width: 1024px) {
  .qbl { padding: 24px 24px 56px; }
  .qbl-strip { display: none; }
  .qbl-grid { grid-template-columns: minmax(0, 248px) minmax(0, 1fr); }
  .qbl-side { display: block; position: sticky; top: calc(var(--header-h, 72px) + 16px); border: 1px solid var(--ph-line, #e7e9ee); border-radius: 8px; background: var(--ph-bg2, #fff); }
  .qbl-side .stu-nav { max-height: calc(100vh - var(--header-h, 72px) - 34px); overflow-y: auto; scrollbar-width: thin; padding: 8px 10px 12px; }
  .qbl-side .stu-guest-cta { padding: 12px 6px 4px; }
}

@media (max-width: 480px) {
  .qbl { padding: 14px 14px 40px; }
  .qbl-strip { margin: -4px -14px 14px; padding: 0 14px; }
}
