/**
 * PracticePilot — Shared Student Navigation bar.
 * Scoped entirely under .ppilot-student-nav; reuses the SAME --ppilot-*
 * color tokens already defined in admin/ppilot-shared.css (loaded on
 * every page this nav mounts on) rather than inventing a new palette.
 */

.ppilot-student-nav {
	--ppilot-nav-height: 56px;
	position: relative;
	width: 100%;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid var(--ppilot-border);
	border-radius: var(--ppilot-radius);
	/* §premium-student-dashboard-visual-correction (Phase 24.1), problem
	   #6 ("navigation looks like ordinary WordPress content, not a
	   premium app"): a soft shadow + slightly shorter bar reads as a
	   compact premium app header rather than a plain content block —
	   layout/markup/links are completely unchanged. */
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 1px 3px rgba(16, 24, 40, 0.06);
	margin: 0 0 16px;
	font-family: inherit;
	color: var(--ppilot-ink);
}

.ppilot-student-nav *,
.ppilot-student-nav *::before,
.ppilot-student-nav *::after {
	box-sizing: border-box;
}

.ppilot-student-nav-el {
	display: block;
	width: 100%;
}

.ppilot-student-nav-inner {
	display: flex;
	align-items: center;
	gap: 16px;
	min-height: var(--ppilot-nav-height);
	padding: 0 16px;
	flex-wrap: nowrap;
}

.ppilot-student-nav-brand {
	font-weight: 700;
	font-size: 15px;
	color: var(--ppilot-navy);
	white-space: nowrap;
	flex: 0 0 auto;
}

.ppilot-student-nav-links {
	display: flex;
	align-items: center;
	gap: 4px;
	list-style: none;
	margin: 0;
	padding: 0;
	flex: 1 1 auto;
	min-width: 0;
	overflow-x: auto;
	scrollbar-width: none;
}

.ppilot-student-nav-links::-webkit-scrollbar {
	display: none;
}

.ppilot-student-nav-item {
	flex: 0 0 auto;
}

.ppilot-student-nav-link {
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 13.5px;
	font-weight: 600;
	white-space: nowrap;
	text-decoration: none;
	color: var(--ppilot-muted);
	transition: background 0.15s ease, color 0.15s ease;
}

a.ppilot-student-nav-link:hover {
	background: var(--ppilot-bg);
	color: var(--ppilot-navy);
}

a.ppilot-student-nav-link:focus-visible {
	outline: 2px solid var(--ppilot-gold);
	outline-offset: 1px;
}

.ppilot-student-nav-link.is-active {
	background: var(--ppilot-gold-light);
	color: var(--ppilot-navy);
}

/* Non-configured link: plain, de-emphasized, non-interactive text — never
 * a broken/guessed href.
 * v0.49.3: no longer faded with `opacity: 0.5` (which also hit the CURRENT
 * page's own item — see the isolation layer at the end of this file);
 * de-emphasis is now a solid slate colour that still clears 4.5:1. */
span.ppilot-student-nav-link,
.ppilot-student-nav-link.is-disabled {
	color: var(--ppilot-muted, #64748b);
	cursor: not-allowed;
}

.ppilot-student-nav-bell-slot {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	margin-left: auto;
}

/* §toggle-theme-reset-specificity-hotfix: scoped with the .ppilot-student-nav
 * ancestor + button element type (specificity 0-2-1) so this rule reliably
 * beats a theme reset stylesheet's own `[type=button], [type=submit], button
 * { display: inline-block; }` rule (0-1-0 for the matching [type=button]
 * branch, tied with the old bare .ppilot-student-nav-toggle selector and
 * then lost on source order). Confirmed via live DevTools: the theme rule
 * was winning and forcing the toggle to render as inline-block instead of
 * the intended flex/none states below, on both desktop and the <=767px
 * breakpoint. Properties unchanged — only the selector was strengthened. */
.ppilot-student-nav button.ppilot-student-nav-toggle {
	display: none;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--ppilot-border);
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	gap: 4px;
	flex-direction: column;
}

.ppilot-student-nav-toggle:focus-visible {
	outline: 2px solid var(--ppilot-gold);
	outline-offset: 1px;
}

/* §toggle-icon-invisible-token-fix: the three bars below render (correct
 * markup, correct display, correct 20x2 box) but were PAINTING TRANSPARENT
 * on every real student-facing page. Root cause: `--ppilot-ink` (like every
 * --ppilot-* token) is only ever defined on `.ppilot-app` (admin/
 * ppilot-shared.css:18), and `#ppilot-student-nav-mount` — unlike every
 * other student-facing root div in includes/Core/Plugin.php — is rendered
 * WITHOUT that class (Plugin.php:680). So `var(--ppilot-ink)` resolves to
 * nothing here, and per spec an unresolvable var() in a non-inherited
 * property (background) computes to that property's initial value —
 * transparent — not black. The bars were never missing or hidden by
 * another rule; they were invisible-on-white. A literal fallback makes
 * this rule correct on its own, with no dependency on an ancestor class
 * and no change to the working toggle markup/JS/specificity fix above. */
.ppilot-student-nav-toggle-bar {
	display: block;
	width: 20px;
	height: 2px;
	background: var(--ppilot-ink, #1f2430);
	border-radius: 1px;
}

@media (max-width: 767px) {
	.ppilot-student-nav-inner {
		flex-wrap: wrap;
		padding: 8px 12px;
	}

	.ppilot-student-nav-brand {
		flex: 1 1 auto;
	}

	.ppilot-student-nav-bell-slot {
		margin-left: 0;
		order: 2;
	}

	.ppilot-student-nav button.ppilot-student-nav-toggle {
		display: flex;
		order: 3;
	}

	.ppilot-student-nav-links {
		order: 4;
		flex-basis: 100%;
		width: 100%;
		flex-direction: column;
		align-items: stretch;
		overflow-x: visible;
		max-height: 0;
		overflow-y: hidden;
		gap: 0;
		transition: max-height 0.2s ease;
	}

	.ppilot-student-nav.is-open .ppilot-student-nav-links {
		max-height: 600px;
		padding: 8px 0 4px;
	}

	.ppilot-student-nav-item {
		width: 100%;
	}

	.ppilot-student-nav-link {
		width: 100%;
		min-height: 44px;
		border-radius: 4px;
	}
}


/* =====================================================================
   v0.49.3 — STUDENT NAV THEME-ISOLATION LAYER (keep LAST in this file)
   ---------------------------------------------------------------------
   Live report (hpgovtjob.com, v0.49.2): nav items underlined, theme-blue,
   "Dashboard" and "Mock Tests" light grey with no clear meaning, no
   active indicator, bell in a pink square box. Causes found:
   1. TOKENS NEVER RESOLVED. Every rule above reads var(--ppilot-*), but
      those tokens are only defined on `.ppilot-app` (admin/
      ppilot-shared.css) and #ppilot-student-nav-mount is NOT a
      .ppilot-app element. An unresolvable var() makes `color` fall back
      to inheriting, `background`/`border` to their initial values — so
      the item colour, the active-state gold pill, the hover background
      and even the bar's own border silently rendered as nothing, and
      the theme's colours showed through.
   2. THEME BLEED. `.ppilot-student-nav-link` (0,1,0) loses to a theme's
      `.entry-content a { color; text-decoration: underline }` (0,1,1);
      `.entry-content ul/li` margins + bullets hit the list; the theme's
      `button`/`[type=button]` rule repainted the notification bell as a
      pink-bordered square.
   3. "DASHBOARD" GREY = A STATE BUG, NOT THEME. On the dashboard page the
      current page is rendered (by design) as a non-link <span> with
      classes `is-active is-disabled` (Plugin::render_student_nav_mount()
      never resolves a URL for the page you are on). The old
      `.is-disabled { opacity: .5 }` rule therefore made the ACTIVE item
      look disabled. Fixed below: `.is-active` always wins.
   4. "MOCK TESTS" GREY = INTENTIONAL STATE. StudentNavResolver found no
      published page carrying the mock-tests shortcode on that site, so
      the item is rendered as non-interactive text (never a guessed URL).
      It now reads clearly as unavailable: solid slate text (>=4.5:1),
      lighter weight, not-allowed cursor, no hover, no underline.
   Everything is scoped to #ppilot-student-nav-mount (the nav's real root,
   Plugin.php render_student_nav_mount()); nothing global is touched.
   ===================================================================== */
#ppilot-student-nav-mount {
	--ppilot-navy: #0b1f45;
	--ppilot-ink: #1f2a44;
	--ppilot-muted: #64748b;
	--ppilot-border: #e2e8f0;
	--ppilot-bg: #f1f5f9;
	--ppilot-gold: #d97706;
	--ppilot-gold-light: #fef3e2;
	--ppilot-radius: 12px;
	--pp-nav-item: #1f2a44;
	--pp-nav-accent: #2563eb;
	--pp-nav-active-bg: #eaf1ff;
	color: var(--pp-nav-item);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
	font-size: 14px;
	line-height: 1.4;
	text-align: left;
	letter-spacing: normal;
	opacity: 1;
	filter: none;
}

/* Tier 1 (1,0,1): element baseline — beats every class-based theme rule. */
#ppilot-student-nav-mount :is(nav, div, ul, li, span, p, strong, small, label) {
	color: inherit;
	font-family: inherit;
	line-height: inherit;
	letter-spacing: inherit;
	opacity: 1;
}
#ppilot-student-nav-mount :is(ul, li) {
	margin: 0;
	padding: 0;
	list-style: none;
}
#ppilot-student-nav-mount li::before,
#ppilot-student-nav-mount li::after {
	content: none;
}

/* Tier 2 (1,1,0+): the nav's own classes. */
#ppilot-student-nav-mount .ppilot-student-nav-brand {
	color: var(--ppilot-navy);
	font-size: 16px;
	font-weight: 800;
	letter-spacing: -0.01em;
	padding-right: 16px;
	margin-right: 4px;
	border-right: 1px solid var(--ppilot-border);
	line-height: 24px;
}

#ppilot-student-nav-mount .ppilot-student-nav-link,
#ppilot-student-nav-mount a.ppilot-student-nav-link:visited {
	position: relative;
	display: inline-flex;
	align-items: center;
	min-height: 36px;
	padding: 7px 12px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	box-shadow: none;
	color: var(--pp-nav-item);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	text-transform: none;
	white-space: nowrap;
	opacity: 1;
	filter: none;
}

#ppilot-student-nav-mount a.ppilot-student-nav-link:hover {
	background: var(--ppilot-bg);
	color: var(--ppilot-navy);
	text-decoration: none;
	opacity: 1 !important;
	filter: none !important;
}

#ppilot-student-nav-mount a.ppilot-student-nav-link:focus,
#ppilot-student-nav-mount a.ppilot-student-nav-link:active {
	text-decoration: none;
	opacity: 1 !important;
	filter: none !important;
}

#ppilot-student-nav-mount a.ppilot-student-nav-link:focus-visible {
	outline: 2px solid var(--pp-nav-accent);
	outline-offset: 2px;
	text-decoration: none;
	opacity: 1 !important;
	filter: none !important;
}

/* Unavailable (destination not configured on this site): intentional,
   clearly-read state — never faded, never interactive-looking. */
#ppilot-student-nav-mount .ppilot-student-nav-link.is-disabled {
	color: var(--ppilot-muted);
	font-weight: 500;
	cursor: not-allowed;
	background: transparent;
}

/* Active = the page you are on. Declared after .is-disabled with higher
   specificity so the current page (rendered as a non-link span on its
   own page) always reads as ACTIVE, never as disabled. */
#ppilot-student-nav-mount .ppilot-student-nav-link.is-active,
#ppilot-student-nav-mount .ppilot-student-nav-link.is-active.is-disabled,
#ppilot-student-nav-mount a.ppilot-student-nav-link.is-active:visited,
#ppilot-student-nav-mount a.ppilot-student-nav-link.is-active:hover {
	color: var(--ppilot-navy);
	font-weight: 700;
	background: var(--pp-nav-active-bg);
	box-shadow: inset 0 -2px 0 var(--pp-nav-accent);
	cursor: default;
	opacity: 1;
}

/* Notification bell (rendered by assets/notifications.js into the nav's
   bell slot): the theme's `button` / `[type=button]` rules were turning it
   into a pink-bordered square with uppercase serif text. */
#ppilot-student-nav-mount .ppilot-notif-bell,
#ppilot-student-nav-mount button.ppilot-notif-bell {
	width: 38px;
	height: 38px;
	min-width: 0;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 1px solid var(--ppilot-border);
	border-radius: 999px;
	background: #fff;
	box-shadow: none;
	color: var(--ppilot-navy);
	font: inherit;
	line-height: 1;
	text-transform: none;
	opacity: 1;
	filter: none;
}
#ppilot-student-nav-mount button.ppilot-notif-bell:hover {
	background: var(--ppilot-bg);
	border-color: #cbd5e1;
	color: var(--ppilot-navy);
	opacity: 1 !important;
	filter: none !important;
}
#ppilot-student-nav-mount button.ppilot-notif-bell:focus-visible {
	outline: 2px solid var(--pp-nav-accent);
	outline-offset: 2px;
}
#ppilot-student-nav-mount .ppilot-notif-bell-icon {
	color: var(--ppilot-navy);
	font-size: 17px;
	line-height: 1;
}
#ppilot-student-nav-mount .ppilot-notif-badge {
	top: -5px;
	right: -5px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	background: #dc2626;
	color: #fff;
	border: 2px solid #fff;
	font-size: 10px;
	font-weight: 700;
	line-height: 1;
}
#ppilot-student-nav-mount .ppilot-notif-panel { color: var(--ppilot-ink); text-align: left; }
#ppilot-student-nav-mount .ppilot-notif-panel-head { color: var(--ppilot-ink); }
#ppilot-student-nav-mount .ppilot-notif-row-title { color: var(--ppilot-ink); line-height: 1.35; }
#ppilot-student-nav-mount .ppilot-notif-row-text { color: #475569; line-height: 1.4; }
#ppilot-student-nav-mount .ppilot-notif-row-date { color: #475569; }
#ppilot-student-nav-mount .ppilot-notif-row-icon { color: var(--ppilot-ink); }
#ppilot-student-nav-mount .ppilot-notif-empty { color: #475569; }
#ppilot-student-nav-mount button.ppilot-notif-mark-all {
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 2px;
	background: none;
	box-shadow: none;
	color: var(--pp-nav-accent);
	font: 600 12px/1.2 inherit;
	font-family: inherit;
	text-transform: none;
	opacity: 1;
}
#ppilot-student-nav-mount button.ppilot-notif-mark-all:hover {
	background: none;
	color: #1d4ed8;
	text-decoration: underline;
	opacity: 1 !important;
}

/* Mobile menu toggle: base rule above already beats theme `button`;
   this pins its hover so the theme's pink `button:hover` cannot paint it. */
#ppilot-student-nav-mount button.ppilot-student-nav-toggle {
	border: 1px solid var(--ppilot-border);
	border-radius: 8px;
	background: #fff;
	box-shadow: none;
	margin: 0;
	opacity: 1;
}
#ppilot-student-nav-mount button.ppilot-student-nav-toggle:hover {
	background: var(--ppilot-bg);
	border-color: #cbd5e1;
	opacity: 1 !important;
	filter: none !important;
}
#ppilot-student-nav-mount .ppilot-student-nav-toggle-bar {
	background: var(--ppilot-navy);
}

@media (max-width: 767px) {
	#ppilot-student-nav-mount .ppilot-student-nav-brand {
		border-right: 0;
		padding-right: 0;
	}
	#ppilot-student-nav-mount .ppilot-student-nav-link,
	#ppilot-student-nav-mount a.ppilot-student-nav-link:visited {
		display: flex;
		width: 100%;
		min-height: 44px;
		border-radius: 8px;
	}
	/* Vertical list: a left accent bar reads better than a bottom bar. */
	#ppilot-student-nav-mount .ppilot-student-nav-link.is-active,
	#ppilot-student-nav-mount .ppilot-student-nav-link.is-active.is-disabled {
		box-shadow: inset 3px 0 0 var(--pp-nav-accent);
	}
}
