/**
 * PassTheBar Exam Focus 1.0.1
 *
 * Every selector below is gated behind html.pbef-exam-active, which the
 * companion script only adds while a question is visible on screen.
 * Nothing here applies to sales pages, the disclaimer screen, or any
 * marketing page.
 *
 * Layout only. No colours, no type sizes, no exam engine internals.
 * Nothing is deleted, moved in the DOM, or written anywhere.
 */

/* ---------------------------------------------------------------
   1. Let the site header scroll away instead of staying pinned

   position relative, not static, is deliberate. Static would strip
   the header of its role as a containing block, and this site runs
   fusion-main-menu-search-overlay plus dropdown sub menus that are
   positioned against it. Relative takes it out of the fixed layer
   and puts it back in the normal flow while leaving that role
   intact, so menus and the search overlay keep working.
   --------------------------------------------------------------- */

html.pbef-exam-active .fusion-header-wrapper,
html.pbef-exam-active .fusion-sticky-header-wrapper,
html.pbef-exam-active .fusion-header {
	position: relative !important;
	top: auto !important;
	bottom: auto !important;
}

/* Avada reserves an invisible spacer the height of the sticky header.
   With the header back in the flow that spacer is dead space. */
html.pbef-exam-active .fusion-header-sticky-height {
	display: none !important;
}

/* ---------------------------------------------------------------
   2. Timer behaviour
   --------------------------------------------------------------- */

/* Recommended: the clock pins to the very top once the header has
   scrolled past, so it stays readable during a long fact pattern.
   z-index 90 sits above page content but below the exam tools panel,
   so the two never fight over the same corner. */
html.pbef-exam-active.pbef-mode-pin .time_div {
	position: sticky !important;
	top: 0 !important;
	z-index: 90 !important;
}

/* Alternative: the clock scrolls away with everything else. */
html.pbef-exam-active.pbef-mode-scroll .time_div {
	position: static !important;
	top: auto !important;
}

/* ---------------------------------------------------------------
   3. Optional extras, off unless switched on in Settings
   --------------------------------------------------------------- */

html.pbef-exam-active.pbef-hide-promo #simple-banner,
html.pbef-exam-active.pbef-hide-promo .simple-banner {
	display: none !important;
}

html.pbef-exam-active.pbef-hide-totop #toTop {
	display: none !important;
}

/* ---------------------------------------------------------------
   4. Respect people who ask for reduced motion
   --------------------------------------------------------------- */

@media ( prefers-reduced-motion: reduce ) {
	html.pbef-exam-active .fusion-header-wrapper,
	html.pbef-exam-active .fusion-header {
		transition: none !important;
	}
}
