﻿html {
	font-size: 14px;
}

html, body {
	height: 100%;
}

body {
	display: flex;
	flex-direction: column;
}

main {
	flex: 1;
}

@media (min-width: 768px) {
	html {
		font-size: 16px;
	}
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus, .chip-badge:focus {
	box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #232D4B;
	border: none !important;
}

.accordion-header .accordion-button
{
	box-shadow:none !important;
}

html {
	position: relative;
	min-height: 100%;
}

body {
	margin-bottom: 60px;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
	color: var(--bs-secondary-color);
	text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
	text-align: start;
}

/* UVA color palette */
:root {
	--uva-blue: #232D4B;
	--uva-orange: #E57200;
	--uva-darkblue: #141e3c;
	--brand-navy: #232D4B;
	--light-gray: #f8f9fa;
	--uva-light-orange: #F9DCBF;
	--legacy-real-yellow: #FFCC33;
	--legacy-real-blue: #CCFFFF;
	--legacy-real-green: #AAFFAA;
	--legacy-real-light-yellow: #FFFFCC;
	--legacy-real-mag: #FFDDDD;
	--legacy-real-mar: #990000;
}

.header-uva-bg {
	background-color: var(--uva-blue);
	color: white;
}

#navbarMobile a {
	color: white;
	font-weight: 500 !important;
	font-size: 1.1rem !important;
	padding-left: 5px;
	margin-top: 2px;
}

#navbarMobile a:hover {
	background-color: var(--uva-orange);
	color: var(--uva-darkblue);
	font-weight: 500 !important;
	font-size: 1.1rem !important;
}

/* Header background */
.header-uva {
	background-color: var(--uva-blue);
	color: white;
	height: 60px;
	flex-shrink: 0;
}

.uva-menu-links a.nav-link {
	display: flex;
	align-items: center;
	height: 100%;
	width: 100%;
}

/* Header links */
.uva-menu-links a, .uva-menu-links li a {
	color: white;
	font-weight: 500 !important;
	font-size: 1.1rem !important;
}

@media (min-width: 576px) {
	.uva-menu-links li a {
		padding-left: 5px !important;
		padding-right: 5px !important;
	}
}

@media (min-width: 768px) {
	.uva-menu-links li a {
		padding-left: 15px !important;
		padding-right: 15px !important;
		font-weight: 400 !important;
		font-size: 1rem !important;
	}
}

@media (min-width: 992px) {
	.uva-menu-links li a {
		padding-left: 40px !important;
		padding-right: 40px !important;
	}
}

@media (min-width: 1200px) {
	.uva-menu-links li a {
		padding-left: 50px !important;
		padding-right: 50px !important;
	}
}

.uva-menu-links li a.active {
	background-color: var(--uva-darkblue);
}

/* Hover / active / focus states */
.uva-menu-links li a:hover,
.uva-menu-links li a:focus,
.uva-menu-links li a.active:hover,
.uva-menu-links li a.active:focus {
	background-color: var(--uva-orange);
	color: var(--uva-darkblue);
	box-shadow:none !important;
}
.footer-uva {
	background-color: var(--uva-blue);
	height: 260px;
	color: white;
}

.footer-links {
	background-color: var(--uva-darkblue);
	height: 70px;
}

	.footer-links a {
		color: #fff;
		margin-left: 30px;
		margin-right: 30px;
		text-decoration: underline;
		text-decoration-color: #009fdf;
		text-decoration-thickness: 2px;
		text-underline-offset: .15em
	}

		.footer-links a:hover {
			text-decoration: none;
		}

.footer-logo {
	height: 175px;
}

@media (max-width: 576px) {
	.footer-uva {
		height: auto;
	}

	.footer-links {
		height: auto;
		padding: 8px 0;
	}

		.footer-links .container {
			display: flex;
			flex-wrap: wrap;
			justify-content: center;
			gap: 6px 16px;
		}

		.footer-links a {
			margin: 0 12px;
			padding: 6px 0;
			display: inline-block;
		}

	.footer-logo {
		height: auto;
		padding: 12px 0;
		text-align: center;
	}

		.footer-logo img {
			max-width: 220px;
			height: auto;
		}

		.footer-logo p {
			font-size: .9rem;
		}
}

.preface-section {
	background-color: #f8f9fa; /* Soft light gray */
}

.preface-section h1 {
	font-family: "adobe-caslon-pro" !important;
	font-size: 3rem;
}

.preface-section h1 span.orange {
	color: var(--uva-orange);
}

.btn-primary {
	box-shadow: var(--uva-darkblue);
	background-color: var(--uva-darkblue) !important;
	color: white;
	border-color: var(--uva-darkblue);
}

	/*.btn-primary:focus {
		box-shadow: 0 0 0 .25rem rgba(88,107,162,1);
	}*/

/*a:focus {
	outline: none;*/ /* optional: remove default outline */
	/*box-shadow: 0 0 0 .25rem rgba(20, 30, 60, 0.5);*/ /* custom focus ring */
	/*border-radius: .25rem;*/ /* optional, to soften corners */
/*}*/

a.btn-primary {
	text-decoration: none;
	color: #fff;
	background-color: var(--uva-darkblue);
	border-color: var(--uva-darkblue);
}

.btn-primary:hover {
	color: #fff;
	background-color: var(--uva-blue) !important;
	border-color: var(--uva-blue);
}

/*.btn-primary:focus{
	box-shadow:none !important;
}*/

.form-select:focus
{
	border-color: var(--uva-blue) !important;
	box-shadow:none;
}

.back-to-top {
	position: fixed;
	right: 1rem;
	bottom: 1rem;
	display: none; /* Hidden by default */
	opacity: 0;
	transition: opacity 0.5s ease-in-out;
	z-index: 1050; /* Ensure it stays on top of other elements */
	color: #fff; /* Arrow color */
	background-color: #0d6efd; 
	width: 3rem;
	height: 3rem;
	border-radius: 50%; /* Makes it a circle */
	text-align: center;
	line-height: 2.5rem;
	font-size: 1.5rem;
	align-items: center;
	justify-content: center;
	background-color: var(--uva-orange);
	color: var(--uva-darkblue);
}

.back-to-top:hover {
	color: white;
}

/* Class to show the button */
.back-to-top.show {
	display: inline-flex;
	opacity: 1;
}

.search-input {
	height: 50px;
	border-radius: 30px;
	padding-left: 35px;
	border: none;
	box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.tile-card {
	transition: transform .08s ease, box-shadow .12s ease;
}

.tile-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 .5rem 1.25rem rgba(0,0,0,.08);
}

.accordion-header {
	font-family: 'adobe-caslon-pro';
}

.accordion-header .accordion-button {
	background-color: #232D4B !important;
	color: white;
}

/* Hide Bootstrap’s default chevron on the right */
.accordion-button::after {
	display: none;
}

/* Left + / − icon */
.accordion-button[data-bs-toggle]::before {
	content: "+";
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.25rem;
	height: 1.25rem;
	margin-right: .5rem;
	border: 1px solid var(--bs-border-color);
	border-radius: .25rem;
	font-weight: 700;
	line-height: 1;
	font-size: .9rem;
}

.accordion-button[data-bs-toggle]:not(.collapsed)::before {
	content: "\2212"; /* minus sign */
}

.accordion-button:focus
{
	text-decoration:underline;
}

.search-icon {
	position: absolute;
	top: 50%;
	left: 15px;
	transform: translateY(-50%);
	color: #888;
}


/* Header styled like your accordion, with extra height */
.card .accordion-header .accordion-button {
	/*background-color: #232D4B !important;*/
	background-color: var(--uva-darkblue) !important;
	color: white !important;
	padding: 1.25rem 1rem; /* taller */
	min-height: 3.25rem;
	font-weight: 600;
}

.course-number-col {
	background-color: var(--uva-blue) !important;
	color: white;
}

.course-name-col {
	background-color: var(--light-gray) !important;
	color: var(--uva-darkblue);
	border-bottom: 1px solid rgba(0,0,0,.125);
}

/* zebra + spacing for course rows */
.course-info .row:nth-child(odd) {
	background-color: white;
}

.course-info .row:nth-child(even) {
	background-color: #f8f9fa;
}

.course-info a, table a {
	color: #0b5ed7;
}

.course-item {
	border-top: 1px solid var(--bs-border-color);
}

.course-list .row:first-child {
	border-top: 0;
}

.course-info .row {
	border-top: 1px solid var(--bs-border-color);
}

.course-info .row:first-child {
	border-top: 0;
}

.course-info .meetings
{
	background-color:transparent !important;
}

.class-topic {
	color: var(--uva-darkblue);
}

@media (min-width: 992px) { /* Large breakpoint */
	.col-class-title {
		width:250px;
	}
}

/* ----------- Legacy mode -------------- */

html.legacy-mode .card .accordion-header .accordion-button {
	background-color: var(--legacy-real-yellow) !important;
	color:black !important;
}

html.legacy-mode .course-info .row:nth-child(odd) {
	background-color: var(--legacy-real-light-yellow);
}

html.legacy-mode .course-info .row:nth-child(even) {
	background-color: var(--legacy-real-mag);
}

html.legacy-mode .course-info .row {
	border:0;
}

html.legacy-mode .course-item {
	border:0;
}

html.legacy-mode .course-name-col {
	background-color: var(--legacy-real-green) !important;
	color: #232D4B;
	border: 0;
}

html.legacy-mode .course-number-col {
	background-color: var(--legacy-real-blue) !important;
	color: #232D4B;
	border:0;
}

html.legacy-mode .course-info .meetings {
	background-color: transparent !important;
}


/* Apply when <html class="legacy-mode"> is set */
html.legacy-mode .legacy-history {
	/* keep Bootstrap sizing but tighten it a bit for legacy look */
	font-size: .9rem;
	border-collapse: separate; /* keep Bootstrap table borders */
	border-spacing: 0;
	border-spacing: 2px;
}

	/* Header bar = legacy yellow */
	html.legacy-mode .legacy-history thead th {
		background-color: #DDDDFF !important;
		color: #000 !important;
		border-color: #d4c000 !important; /* subtle contrast line */
		position: sticky; /* optional: sticky header in offcanvas */
		top: 0;
		z-index: 1;
	}

	/* Zebra rows with legacy light yellow / magenta */
	html.legacy-mode .legacy-history tbody tr:nth-child(odd) > * {
		background-color: var(--legacy-real-light-yellow) !important;
	}

	html.legacy-mode .legacy-history tbody tr:nth-child(even) > * {
		background-color: var(--legacy-real-mag) !important;
	}

	/* Column accents to mirror your legacy number/name colors
   - Semester (col 1) gets the legacy blue wash on the cell
   - Title (col 3) gets the legacy green wash on the cell
   Using a gentle left border so text stays readable. */
	html.legacy-mode .legacy-history tbody td:nth-child(1) {
		border-left: white;
		color: #232D4B;
	}

	html.legacy-mode .legacy-history tbody td:nth-child(3) {
		border-left: white;
		color: #232D4B;
	}


		html.legacy-mode .legacy-history a:hover {
			text-decoration-color: currentColor;
		}

	/* Compact row height like the legacy list */
	html.legacy-mode .legacy-history.table-sm > :not(caption) > * > * {
		padding-top: .35rem;
		padding-bottom: .35rem;
	}

	/* Optional: hover highlight that works with the stripes */
	html.legacy-mode .legacy-history tbody tr:hover > * {
		filter: brightness(0.97);
	}

	/* Optional: “No records” row stays neutral */
	html.legacy-mode .legacy-history tbody tr td.text-muted {
		background: transparent !important;
	}


/* “chips” for status (legacy colors preserved) */
.chip-open {
	background: #eaf7ee;
	color: #157347;
	border: 1px solid #badbcc;
	border-radius: .25rem;
	padding: .15rem .4rem;
}

.chip-closed {
	background: #fde2e1;
	color: #b02a37;
	border: 1px solid #f5c2c7;
	border-radius: .25rem;
	padding: .15rem .4rem;
}

/* ---------- Slideover polish ---------- */
#sectionDetails.offcanvas {
	width: min(760px, 92vw);
	background: linear-gradient(180deg,#ffffff 0%, #fafbfc 100%);
}

.offcanvas-header {
	background: linear-gradient(90deg,var(--brand-navy), #2f3b63);
	color: #fff;
	border: 0;
	box-shadow: 0 2px 6px rgba(18,25,38,.15);
}

#sd-code {
	opacity: .85;
}


.course-list .stat {	
	align-items: center;
	gap: .5rem;
	background: #fff;
	border: 1px solid var(--bs-border-color);
	border-radius: .5rem;
	padding: .12rem .25rem;
	box-shadow: 0 1px 2px rgba(16,24,40,.05);
	white-space: nowrap;
	font-size: .875rem;
	
}


#sectionDetails .stat {
	display: flex;
	align-items: center;
	gap: .5rem;
	background: #fff;
	border: 1px solid var(--bs-border-color);
	border-radius: .5rem;
	padding: .5rem .75rem;
	box-shadow: 0 1px 2px rgba(16,24,40,.05);
	white-space: nowrap;
	font-size: .875rem;
}

#sectionDetails .section-card {
	background: #fff;
	border: 1px solid var(--bs-border-color);
	border-radius: .75rem;
	padding: 1rem;
}

#sectionDetails .section-title {
	font-weight: 600;
	font-size: .8rem;
	text-transform: uppercase;
	letter-spacing: .04em;
	color: #667085;
	margin-bottom: .5rem;
}

/* Wider offcanvas on desktop, full-width on mobile/tablet */
/*#enrollmentDetails {*/
	/* fallback if clamp unsupported */
	/*--bs-offcanvas-width: 90vw;*/
	/* prefer a big, but bounded width */
	/*--bs-offcanvas-width: clamp(480px, 80vw, 1100px);
}*/

@media (min-width: 992px) {
	#enrollmentDetails {
		width: 60% !important;
	}
}

@media (max-width: 992px) {
	#enrollmentDetails {
		width: 80% !important;
	}
}
/* row of small round chips */
.meta-icons .chip {
	width: 1.6rem;
	height: 1.6rem;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: .85rem;
	line-height: 1;
	background: #eef4ff;
	color: #0d47a1;
	border: 1px solid #cfe2ff;
	box-shadow: 0 1px 2px rgba(0,0,0,.04);
	transition: transform .12s ease, box-shadow .12s ease;
}

.meta-icons .chip:hover {
	transform: translateY(-1px);
	box-shadow: 0 2px 6px rgba(0,0,0,.08);
}

.meta-icons {
	gap: .35rem;
}

.chip-er {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.35rem;
	height: 1.35rem;
	border-radius: 50%;
	font-weight: 700;
	font-size: .72rem;
	line-height: 1;
	background: #e21818;
	color: white;
	border: 1px solid rgba(0,0,0,.25);
	cursor: pointer;
	user-select: none;
	vertical-align: middle;
}

/* Row of tiny circular chips */
.req-chips {
	display: inline-flex;
	gap: .35rem;
	align-items: center;
}

.chip-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.35rem;
	height: 1.35rem;
	border-radius: 50%;
	font: 700 .72rem/1 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	background: #141e3c;
	color: white;
	border: 1px solid rgba(0,0,0,.25);
	cursor: pointer;
	user-select: none;
	vertical-align: middle;
}

	.chip-badge:hover {
		transform: translateY(-1px);
		box-shadow: 0 2px 6px rgba(0,0,0,.12);
	}

/* Popover polish */
.req-popover {
	z-index: 4000 !important;
}

	.req-popover .popover-body {
		white-space: pre-wrap;
	}

	/* Keep the little arrow centered at the bottom when on top */
	.req-popover[data-popper-placement="top"] .popover-arrow {
		position: absolute;
		top: auto;
		bottom: calc(-1 * var(--bs-popover-arrow-height));
		left: 50% !important;
		transform: translateX(-50%) !important;
	}
.req-popover {
	--bs-popover-max-width: min(92vw, 360px);
	max-width: min(92vw, 360px);
	z-index: 4000 !important;
	height: auto !important;
}

	.req-popover .popover-body {
		max-height: 60vh;
		overflow: auto;
	}

	.req-popover[data-popper-placement="top"] .popover-arrow {
		position: absolute;
		top: auto;
		bottom: calc(-1 * var(--bs-popover-arrow-height));
		left: 50% !important;
		transform: translateX(-50%) !important;
	}


.term-select {
	flex: 0 0 auto;
	width: auto !important;
	max-width: 12rem;
	min-width: 8rem;
}

/* search bar wrapper you already made sticky */
#searchToolbar {
	position: sticky;
	top: var(--hl-fixed-header);
	z-index: 1040;
	background: var(--bs-body-bg);
}

/* ensure each card is its own stacking/scroll boundary for sticky push-off */
.subject-card {
	position: relative;
	isolation: isolate;
}

/* blue subject header sticks under toolbar */
.sticky-subject {
	position: sticky;
	top: calc(var(--hl-fixed-header) + var(--hl-toolbar-h));
	z-index: 1030;
	background: #1f2943; /* your blue */
	color: var(--bs-body-bg);
}

/* optional “stuck” shadow */
.sticky-subject.is-stuck,
.sticky-course.is-stuck {
	box-shadow: 0 6px 14px rgba(0,0,0,.08);
}

.spinner-grow,
.spinner-border {
	display: inline-block;
	width: var(--bs-spinner-width);
	height: var(--bs-spinner-height);
	vertical-align: var(--bs-spinner-vertical-align);
	border-radius: 50%;
	animation: var(--bs-spinner-animation-speed) linear infinite var(--bs-spinner-animation-name);
}

.hover-shadow:hover {
	box-shadow: 0 .2rem .6rem rgba(0,0,0,.08);
	background: #f8f9fa;
}

.accordion-collapse .card-body
{
	padding: 2px 2px 2px 2px;
}

.accordion-collapse .card-body a
{
	margin-left: 2px;
	margin-right:2px;
}

.accordion-collapse .subheader, .accordion-collapse .subheader a{
	border-bottom: none !important;
	color: var(--uva-darkblue);
}