/* Styles shared by the pages with the fixed top navbar (home, teacher, admin). */
body {
	padding-top: 4.5rem;
}

/* A stylesheet rule, not a d-* class: nav.js reveals the menu by clearing
   its inline display, and d-* utilities would override the inline "none". */
#user-menu {
	display: inline-block;
}

/* Flex-centered icons: inline SVGs sit on the text baseline and look low.
   The min-height keeps the buttons as tall as the search input. */
#theme-toggle .btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: calc(1.5em + .75rem + 2px);
}
/* Collapsed to the current mode until keyboard-focused or .open (nav.js sets it on
   mouse hover or a tap). Without an .active button yet, all three show. */
#theme-toggle:has(.active):not(.open, :has(:focus-visible)) .btn:not(.active) {
	display: none;
}
#theme-toggle:has(.active):not(.open, :has(:focus-visible)) .btn.active {
	border-radius: var(--bs-btn-border-radius);
}

/* Teacher picture, or their initials until the first login saves one. A class
   rather than .rounded-circle so cyber.css can reshape it without !important. */
.avatar {
	position: relative;
	flex: none;
	width: 72px;
	height: 72px;
	border-radius: 50%;
	overflow: hidden;
}
.avatar img,
.avatar-initials {
	width: 100%;
	height: 100%;
}
.avatar img {
	object-fit: cover;
}
.avatar-initials {
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.5rem;
	background-color: var(--bs-secondary);
	color: #fff;
}

/* A native <dialog> wearing Bootstrap's modal classes: the browser supplies the
   backdrop, Esc and focus handling that Bootstrap's JS would, and .modal lays it
   out as a full-screen layer. .modal's display:none would hide it even when open. */
.confirm-dialog {
	max-width: none;
	max-height: none;
	padding: 0;
	border: 0;
	background: transparent;
}
.confirm-dialog[open] {
	display: block;
}
.confirm-dialog::backdrop {
	background: rgba(0, 0, 0, .5);
}

/* Admin table headers: a bare button so the header keeps the table's own look. */
.sort-btn {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	letter-spacing: inherit;
	text-transform: inherit;
	white-space: nowrap;
	cursor: pointer;
}
.sort-btn::after {
	/* \FE0E asks for the text glyph: iOS draws a bare \2195 as a boxed emoji. */
	content: '\2195\FE0E';
	margin-left: .3em;
	opacity: .35;
}
th[aria-sort=ascending] .sort-btn::after {
	content: '\25B2';
	opacity: 1;
}
th[aria-sort=descending] .sort-btn::after {
	content: '\25BC';
	opacity: 1;
}

/* Teacher page level headers: the whole row is the toggle. */
.level-btn {
	display: flex;
	align-items: center;
	width: 100%;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	font-weight: 600;
	text-align: left;
	cursor: pointer;
}
.level-btn::before {
	content: '\25B8';
	display: inline-block;
	width: 1.2em;
	transition: transform .15s;
}
.level-btn[aria-expanded=true]::before {
	transform: rotate(90deg);
}
.level-count {
	margin-left: .6em;
	font-weight: 400;
	opacity: .55;
}
.wordlist-row > td:first-child {
	padding-left: 3rem;
}
