/**
 * Modern styling for the Policy Manager user pages
 * Matches the admin interface design with flexible layouts and responsive design
 *
 * @author Kevin Ashbridge <kevin@gwythan.com>
 * @copyright 2010-2013 by Kevin Ashbridge. 2014-2025 by Gwythan Ltd. All rights reserved.
 * @package PolicyManager Framework
 * @since 1.0
 * @version 4.8
 */

/* ========================================
   RESPONSIVE MEDIA AND LAYOUT BASICS
   ======================================== */

img,
object,
embed,
video {
	max-width: 100%;
	height: auto;
}

/* IE 6 does not support max-width so default to width 100% */
.ie6 img {
	width: 100%;
}

/* ========================================
   STATUS CLASSES
   ======================================== */

.embargoedItem {
	background-color: #fff3cd !important;
	border-color: #ffeaa7 !important;
	color: #856404 !important;
}

.offlineItem {
	background-color: #f8d7da !important;
	border-color: #f5c6cb !important;
	color: #721c24 !important;
}

/* ========================================
   LAYOUT AND POSITIONING
   ======================================== */

#divPageWrapper {
	margin: 0 auto;
	width: 100%;
	max-width: 1200px;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

#divMainWrapper {
	flex: 1;
	display: flex;
	flex-direction: column;
	background-color: #f8f9fa;
	min-height: calc(100vh - 120px);
}

header,
main,
footer {
	width: 100%;
	padding: 0 16px;
	box-sizing: border-box;
}

main {
	flex: 1;
	padding: 24px 16px;
	display: flex;
	gap: 24px;
	max-width: 1200px;
	margin: 0 auto;
}

section {
	flex: 1;
	display: flex;
	flex-wrap: wrap;
	align-content: flex-start;
	align-items: flex-start;
	column-gap: 24px;
	row-gap: 0;
	/* Use column-gap for horizontal spacing between aside elements, but no row-gap to prevent vertical separation */
}

/* Aside elements positioned at top of section */
main section aside {
	background-color: #ffffff;
	border: 1px solid #dadce0;
	border-radius: 8px;
	padding: 16px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	order: 1;
	/* Place aside elements first */
}

/* Single aside element takes full width */
main section aside:only-child {
	flex: 1 1 100%;
}

/* Article takes full width and comes after aside elements */
main section article {
	flex: 1 1 100% !important;
	order: 3 !important;
	/* Place article after aside elements on a new line */
	align-self: flex-start !important;
	/* ensure article does not stretch vertically */
}

/* ========================================
   TYPOGRAPHY
   ======================================== */

body {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: #333333;
	background-color: #f8f9fa;
	margin: 0;
	padding: 0;
}

h1,
h2,
h3,
h4,
h5,
h6 {
	font-family: inherit;
	font-weight: 500;
	line-height: 1.2;
	color: #1f92d0;
	margin: 0 0 16px 0;
}

h1 {
	font-size: 2rem;
	font-weight: 400;
}

h2 {
	font-size: 1.5rem;
}

h3 {
	font-size: 1.25rem;
}

h4 {
	font-size: 1.1rem;
}

h5,
h6 {
	font-size: 1rem;
}

p {
	margin: 0 0 16px 0;
	line-height: 1.6;
}

a {
	color: #1f92d0;
	text-decoration: none;
	transition: color 0.2s ease;
}

a:hover {
	color: #1a7bb8;
	text-decoration: underline;
}

/* ========================================
   ARTICLE AND ASIDE LAYOUT
   ======================================== */

article {
	flex: 1;
	background-color: #ffffff;
	border: 1px solid #dadce0;
	border-radius: 8px;
	padding: 24px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	min-height: 400px;
	width: 100%;
}

aside {
	flex: 1 !important;
	min-width: 0 !important;
	align-self: flex-start !important;
	/* Prevent this aside from stretching vertically while maintaining flex width */
}

#asideInformation,
#asidePageNotes {
	background-color: #ffffff;
	border: 1px solid #dadce0;
	border-radius: 8px;
	padding: 20px;
	margin-bottom: 16px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

#asideInformation h2,
#asidePageNotes h2 {
	color: #1f92d0;
	font-size: 1.1rem;
	margin: 0 0 12px 0;
	padding-bottom: 8px;
	border-bottom: 1px solid #e8eaed;
}

#divPolicyDate {
	font-size: 13px;
	color: #5f6368;
	margin-bottom: 16px;
	padding: 12px;
	background-color: #f8f9fa;
	border-radius: 4px;
	border-left: 4px solid #1f92d0;
}

/* Highlight overdue or critical policy notices */
#divPolicyDate.overdue {
	border-left-color: var(--color-accent);
	background-color: #fff8f8;
	color: var(--color-accent);
}

#divReadByPanel {
	padding: 12px;
	border-radius: 4px;
	border-left: 4px solid #34a853;
	background-color: #e8f5e8;
}

#divReadByPanel p {
	margin: 0;
	font-size: 13px;
	color: #137333;
}

/* ========================================
   FORMS AND FORM ELEMENTS
   ======================================== */

form {
	margin: 0;
}

fieldset {
	border: 1px solid #dadce0;
	border-radius: 8px;
	padding: 20px;
	margin: 0 0 16px 0;
	background-color: #ffffff;
}

legend {
	font-weight: 500;
	color: #1f92d0;
	padding: 0 12px;
	font-size: 1.1rem;
}

label {
	display: block;
	font-weight: 500;
	margin-bottom: 4px;
	color: #333333;
	font-size: 14px;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="url"],
input[type="tel"],
input[type="number"],
select,
textarea {
	width: 100%;
	padding: 8px 12px;
	border: 1px solid #dadce0;
	border-radius: 4px;
	font-size: 14px;
	font-family: inherit;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	box-sizing: border-box;
	background-color: #ffffff;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="url"]:focus,
input[type="tel"]:focus,
input[type="number"]:focus,
select:focus,
textarea:focus {
	border-color: #1f92d0;
	box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
	outline: none;
}

input[type="checkbox"] {
	margin-right: 8px;
	accent-color: #1f92d0;
}

/* Checkbox labels should be inline */
label[for]:has(+ input[type="checkbox"]),
input[type="checkbox"]+label,
label:has(input[type="checkbox"]) {
	display: inline-flex;
	align-items: center;
	font-weight: normal;
	margin-bottom: 8px;
	cursor: pointer;
}

/* When checkbox is inside label, ensure proper spacing */
label:has(input[type="checkbox"]) input[type="checkbox"] {
	margin-right: 8px;
	margin-left: 0;
}

/* Radio button labels should also be inline */
input[type="radio"]+label,
label:has(input[type="radio"]),
label.radio {
	display: inline-flex;
	align-items: center;
	font-weight: normal;
	margin-bottom: 8px;
	margin-right: 16px;
	cursor: pointer;
}

input[type="radio"] {
	margin-right: 8px;
	accent-color: #1f92d0;
}

/* Special handling for manual read time radio buttons */
.manualReadTimeRadioBtn {
	display: inline-flex;
	align-items: center;
	margin-right: 16px;
	margin-bottom: 8px;
	font-weight: normal;
}

/* Form validation states */
input.error,
select.error,
textarea.error {
	border-color: var(--color-accent) !important;
	box-shadow: 0 0 0 2px rgba(186, 22, 61, 0.2) !important;
}

.form-error-message {
	color: var(--color-accent);
	font-size: 12px;
	margin-top: 4px;
	display: block;
}

/* ========================================
   MODERN BUTTON STYLING
   ======================================== */

button,
input[type="submit"],
input[type="button"] {
	background-color: #1f92d0;
	color: #ffffff;
	border: none;
	border-radius: 4px;
	padding: 8px 16px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.2s ease, box-shadow 0.2s ease;
	text-decoration: none;
	display: inline-block;
	text-align: center;
	font-family: inherit;
}

button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
	background-color: #1a7bb8;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

button:active,
input[type="submit"]:active,
input[type="button"]:active {
	background-color: #166aa1;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

button:disabled,
input[type="submit"]:disabled,
input[type="button"]:disabled {
	background-color: #f1f3f4;
	color: #9aa0a6;
	cursor: not-allowed;
	box-shadow: none;
}

/* Secondary button style */
button.secondary,
input[type="button"].secondary {
	background-color: #f1f3f4;
	color: #1f92d0;
	border: 1px solid #dadce0;
}

button.secondary:hover,
input[type="button"].secondary:hover {
	background-color: #e8eaed;
	border-color: #1f92d0;
}

/* Accent button style for important actions */
button.accent,
input[type="button"].accent {
	background-color: var(--color-accent);
	color: #ffffff;
	border: 1px solid var(--color-accent);
}

button.accent:hover,
input[type="button"].accent:hover {
	background-color: var(--color-accent-light);
	border-color: var(--color-accent-light);
}

form.menuEditControlForm>button {
	margin-left: 2px;
	background-color: transparent;
	border: none;
	padding: 0;
	border-radius: 0;
	font-size: 14px;
	cursor: pointer;
}

form.menuEditControlForm span.icon {
	color: #000000 !important;
}

button.menuEditControlButton {
	vertical-align: top;
	border: none;
	padding: 2px 4px;
	margin: 0 2px 0 0;
	background-color: transparent;
	cursor: pointer;
	font-size: 14px;
}

button.menuEditControlButton:hover {
	background-color: rgba(0, 0, 0, 0.1);
}

button.menuEditControlButton .icon {
	color: #000000 !important;
}

/* Navigation menu editing: align form controls with title wrapper */
form.menuEditControlForm {
	display: inline-block;
	vertical-align: top;
	margin-right: 4px;
}

/* ========================================
   EDIT BAR AND ADMIN CONTROLS
   ======================================== */

.editBar {
	background-color: #1f92d0;
	color: #ffffff;
	padding: 8px 12px;
	border-radius: 4px 4px 0 0;
	margin: -24px -24px 16px -24px;
	display: flex;
	align-items: center;
	gap: 8px;
}

nav#navLeftHandNav .editBar {
	margin-right: -16px;
	margin-left: -16px;
	padding-bottom: 0;
	padding-top: 0;
}

.editBar button {
	/*background-color: rgba(255, 255, 255, 0.1);*/
	color: #ffffff;
	border: none;
	padding: 0;
	text-decoration: none;
	font-size: 18px;
	transition: background-color 0.2s ease;
}

.editBar button:hover,
.editBar a:hover {
	background-color: rgba(255, 255, 255, 0.2);
}

.editBar .icon {
	color: #ffffff;
	font-size: 18px;
}

/* Right-align the cancel edit icon */
.editBar a.cancelEdit {
	margin-left: auto;
}

/* Alphabetic sorting notice styling */
.alphabetic-sorting-notice {
	background-color: #fff3cd;
	border: 1px solid #ffeaa7;
	border-radius: 4px;
	padding: 8px 12px;
	margin-bottom: 12px;
	color: #856404;
	font-size: 13px;
	display: flex;
	align-items: center;
	gap: 8px;
}

.alphabetic-sorting-notice .icon {
	color: #856404;
	font-size: 16px;
}

/* ========================================
   HEADER STYLING
   ======================================== */

header {
	background-color: #ffffff;
	border-bottom: 1px solid #dadce0;
}

/* Logo bar at top */
#divHeaderLogos {
	display: flex;
	align-items: center;
	justify-content: space-between;
	max-width: 1200px;
	margin: 0 auto;
	padding: 16px;
}

img#imgSchoolLogo {
	max-height: 80px;
	width: auto;
}

#divPVLogo {
	height: 60px;
}

#divPVLogo img {
	max-height: 60px;
	width: auto;
}

/* Full width navigation */
#headerNavigation {
	background-color: #f8f9fa;
	border-top: 1px solid #dadce0;
	width: 100%;
}

#headerNavigation ul {
	display: flex;
	list-style: none;
	margin: 0;
	padding: 0;
	max-width: 1200px;
	margin: 0 auto;
}

#headerNavigation li {
	margin: 0;
}

#headerNavigation a {
	display: block;
	padding: 12px 16px;
	color: #5f6368;
	text-decoration: none;
	border-bottom: 2px solid transparent;
	transition: all 0.2s ease;
}

#headerNavigation a:hover {
	color: #1f92d0;
	background-color: #e8eaed;
}

#headerNavigation a.activeMenuItem {
	color: #1f92d0;
	border-bottom-color: #1f92d0;
}

/* ========================================
   RESPONSIVE CSS NAVIGATION CONTROLS
   ======================================== */

/* Hide the checkbox input used for responsive navigation toggle */
header nav div.divResponsiveCSSNav input#inputResponsiveCSSNavControl {
	display: none !important;
}

/* Mobile hamburger menu button styling */
header nav div.divResponsiveCSSNav label.labelResponsiveCSSNavToggle {
	border: 2px solid #333;
	cursor: pointer;
	display: block;
	position: absolute;
	right: 16px;
	top: 16px;
	font-family: sans-serif;
	color: #fff;
	background-color: #333;
	font-size: 10px;
	line-height: 28px;
	text-align: center;
	width: 32px;
	height: 32px;
	border-radius: 4px;
	z-index: 1000;
}

/* Hamburger menu button content */
header nav div.divResponsiveCSSNav label.labelResponsiveCSSNavToggle::before {
	content: "☰";
	font-size: 16px;
	line-height: 1;
}

/* Initially hide the navigation menu when checkbox is unchecked */
header nav div.divResponsiveCSSNav input#inputResponsiveCSSNavControl~ul {
	display: none;
}

/* Show the navigation menu when checkbox is checked */
header nav div.divResponsiveCSSNav input#inputResponsiveCSSNavControl:checked~ul {
	display: block;
	position: absolute;
	top: 60px;
	right: 16px;
	background-color: #fff;
	border: 1px solid #ddd;
	border-radius: 4px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	z-index: 999;
	min-width: 200px;
}

/* Style menu items when shown */
header nav div.divResponsiveCSSNav input#inputResponsiveCSSNavControl:checked~ul li {
	display: block;
	border-bottom: 1px solid #eee;
}

header nav div.divResponsiveCSSNav input#inputResponsiveCSSNavControl:checked~ul li:last-child {
	border-bottom: none;
}

header nav div.divResponsiveCSSNav input#inputResponsiveCSSNavControl:checked~ul li a {
	display: block;
	padding: 12px 16px;
	color: #333;
	text-decoration: none;
}

header nav div.divResponsiveCSSNav input#inputResponsiveCSSNavControl:checked~ul li a:hover {
	background-color: #f5f5f5;
}

/* Mobile hamburger menu styles */
@media (max-width: 768px) {
	#divHeaderLogos {
		padding: 12px 16px;
	}

	img#imgSchoolLogo {
		max-height: 60px;
		max-width: 200px;
	}

	#divPVLogo {
		height: 45px;
	}

	#divPVLogo img {
		max-height: 45px;
		max-width: 150px;
	}

	#headerNavigation ul {
		flex-direction: column;
		display: none;
	}

	#headerNavigation.mobile-open ul {
		display: flex;
	}

	#headerNavigation::before {
		content: '☰';
		display: block;
		font-size: 24px;
		padding: 12px 16px;
		cursor: pointer;
		background-color: #f8f9fa;
		border-bottom: 1px solid #dadce0;
	}

	#headerNavigation.mobile-open::before {
		content: '✕';
	}
}

/* ========================================
   MAIN NAVIGATION SIDEBAR
   ======================================== */

main nav {
	width: 250px;
	flex-shrink: 0;
	background-color: #ffffff;
	border: 1px solid #dadce0;
	border-radius: 8px;
	padding: 16px;
	height: fit-content;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

main nav ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

main nav li {
	margin: 0;
	border-bottom: 1px solid #e8eaed;
}

main nav li:last-child {
	border-bottom: none;
}

/* jQuery Sortable placeholder styling for drop zones */
main nav ul li.sortablePlaceholder {
	display: block !important;
	height: 2em;
	line-height: 2em;
	background-color: #22c55e;
	background-image: linear-gradient(135deg,
			#22c55e 25%,
			#16a34a 25%,
			#16a34a 50%,
			#22c55e 50%,
			#22c55e 75%,
			#16a34a 75%);
	background-size: 8px 8px;
	border: 2px dashed #15803d;
	border-radius: 4px;
	margin: 4px 0;
	opacity: 0.9;
	position: relative;
	animation: pulseDropZone 1.5s ease-in-out infinite;
	box-shadow: 0 2px 8px rgba(34, 197, 94, 0.3);
}

main nav ul li.sortablePlaceholder::before {
	content: "Drop here";
	position: absolute;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
	color: #ffffff;
	font-weight: 600;
	font-size: 12px;
	text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
	letter-spacing: 0.5px;
}

@keyframes pulseDropZone {

	0%,
	100% {
		opacity: 0.9;
		transform: scale(1);
	}

	50% {
		opacity: 1;
		transform: scale(1.02);
	}
}

main nav a {
	display: block;
	padding: 8px 12px;
	color: #333333;
	text-decoration: none;
	transition: background-color 0.2s ease;
}

main nav a:hover {
	background-color: #f8f9fa;
	color: #1f92d0;
}

main nav li.manualsection a {
	color: #1f92d0;
	font-weight: 500;
	background-color: #f8f9fa;
}

main nav li.notLive a {
	color: #ea4335;
}

/* ========================================
   FOOTER STYLING
   ======================================== */

footer {
	background-color: #ffffff;
	border-top: 1px solid #dadce0;
	color: #5f6368;
	padding: 20px 16px;
	text-align: center;
	font-size: 13px;
	margin-top: auto;
}

footer nav {
	margin-bottom: 16px;
}

footer nav ul {
	display: flex;
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
	gap: 24px;
}

footer nav a {
	color: #5f6368;
	text-decoration: none;
}

footer nav a:hover {
	color: #1f92d0;
	text-decoration: underline;
}

#divManufacturer a {
	color: #5f6368;
}

/* ========================================
   COMPLETION FORM STYLING
   ======================================== */

#completionForm {
	margin-top: 24px;
}

#completionForm fieldset {
	background-color: #e8f5e8;
	border-color: #34a853;
	border-left: 4px solid #34a853;
}

#completionForm legend {
	color: #137333;
}

#completionForm label {
	color: #137333;
	font-weight: normal;
}

#completionForm input[type="checkbox"] {
	accent-color: #34a853;
}

/* ========================================
   LOGIN PAGE STYLING
   ======================================== */

.manuallogin main {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: calc(100vh - 200px);
}

.manuallogin article {
	max-width: 400px;
	margin: 0 auto;
}

.manuallogin h1 {
	text-align: center;
	margin-bottom: 24px;
}

.manuallogin fieldset {
	margin-bottom: 0;
}

.manuallogin .form-group {
	margin-bottom: 16px;
}

.manuallogin button {
	width: 100%;
	padding: 12px;
	font-size: 16px;
}

/* Microsoft login button styling */
.manuallogin button[name="msgraph"] {
	background-color: #0078d4;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-bottom: 16px;
}

.manuallogin button[name="msgraph"]:hover {
	background-color: #106ebe;
}

.manuallogin button[name="msgraph"] img {
	height: 20px;
	width: 20px;
}

/* Login form field spacing */
#formUserLoginForm div {
	margin-bottom: 16px;
}

#formUserLoginForm label {
	margin-bottom: 6px;
}

#formUserLoginForm input {
	margin-bottom: 0;
}

/* Ensure the submit button has some space above it */
#formUserLoginForm div:has(button) {
	margin-top: 24px;
}

/* Fallback for browsers that don't support :has() */
#formUserLoginForm button[type="submit"] {
	margin-top: 8px;
}

/* ========================================
   TABLE OF CONTENTS STYLING
   ======================================== */

table#tableManualTOCListing {
	width: 100%;
	border-collapse: collapse;
	background-color: #ffffff;
	border: 1px solid #dadce0;
	border-radius: 8px;
	overflow: hidden;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

table#tableManualTOCListing th {
	background-color: #f8f9fa;
	color: #1f92d0;
	font-weight: 500;
	padding: 12px;
	text-align: left;
	border-bottom: 1px solid #dadce0;
}

table#tableManualTOCListing td {
	padding: 12px;
	border-bottom: 1px solid #e8eaed;
}

table#tableManualTOCListing tr:hover {
	background-color: #f8f9fa;
}

table#tableManualTOCListing td a {
	color: #333333;
	text-decoration: none;
}

table#tableManualTOCListing td a:hover {
	color: #1f92d0;
	text-decoration: underline;
}

table#tableManualTOCListing td.optionLevel1.manualsection a {
	color: #1f92d0;
	font-weight: 500;
}

.manualTitleRead {
	color: #34a853 !important;
}

.manualTitleNotRead {
	color: var(--color-accent) !important;
}

/* ========================================
   VIDEO EMBEDDING
   ======================================== */

.videoContainer {
	position: relative;
	padding-bottom: 56.25%;
	height: 0;
	overflow: hidden;
	max-width: 100%;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.videoContainer iframe,
.videoContainer object,
.videoContainer embed {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	border-radius: 8px;
}

/* ========================================
   PDF VIEWER
   ======================================== */

embed#pdfViewer {
	width: 100%;
	height: 800px;
	border: 1px solid #dadce0;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

a#aMobilePDFLauncher {
	display: block;
	width: 100%;
	max-width: 300px;
	margin: 16px auto;
	padding: 12px 24px;
	background-color: #1f92d0;
	color: #ffffff;
	text-decoration: none;
	border-radius: 8px;
	text-align: center;
	font-weight: 500;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	transition: background-color 0.2s ease;
}

a#aMobilePDFLauncher:hover {
	background-color: #1a7bb8;
}

/* ========================================
   AGREEMENT PAGE STYLING
   ======================================== */

.agreement main {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: calc(100vh - 200px);
}

.agreement article {
	max-width: 600px;
}

#divAgreementTextBox {
	border: 1px solid #dadce0;
	border-radius: 8px;
	padding: 16px;
	height: 300px;
	overflow-y: auto;
	background-color: #ffffff;
	margin-bottom: 16px;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.1);
}

#formAgreement {
	margin-top: 16px;
}

#formAgreement .form-group {
	margin-bottom: 16px;
}

button#agreementButtonAgree {
	background-color: #34a853;
	margin-right: 8px;
}

button#agreementButtonAgree:hover {
	background-color: #2d8f47;
}

button#agreementButtonDisagree {
	background-color: var(--color-accent);
}

button#agreementButtonDisagree:hover {
	background-color: var(--color-accent-light);
}

/* ========================================
   MODERN ENHANCEMENTS
   ======================================== */

/* Smooth transitions for interactive elements */
button,
input,
select,
textarea,
a,
.editBar {
	transition: all 0.2s ease-in-out;
}

/* Enhanced button hover effects */
button:hover,
input[type="submit"]:hover,
input[type="button"]:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(26, 115, 232, 0.3);
}

/* Modern card hover effects */
article:hover {
	box-shadow: 0 8px 25px rgba(0, 0, 0, 0.12);
}

/* Improved focus states for better accessibility */
*:focus-visible {
	outline: 2px solid #1f92d0;
	outline-offset: 2px;
	border-radius: 4px;
}

/* Better mobile touch targets */
@media (max-width: 768px) {

	button,
	input[type="submit"],
	input[type="button"],
	a {
		min-height: 44px;
		min-width: 44px;
		display: inline-flex;
		align-items: center;
		justify-content: center;
	}

	header nav label.labelResponsiveCSSNavToggle {
		min-height: 44px;
		display: inline-flex;
		align-items: center;
	}
}

/* Reduced motion for accessibility */
@media (prefers-reduced-motion: reduce) {

	*,
	*::before,
	*::after {
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.01ms !important;
	}
}

/* ========================================
   PRINT STYLES
   ======================================== */

@media print {

	.editBar,
	#asidePageNotes,
	#completionForm,
	footer,
	main nav,
	header nav {
		display: none !important;
	}

	body {
		background-color: #ffffff !important;
		font-size: 12pt;
		line-height: 1.4;
	}

	article {
		box-shadow: none !important;
		border: none !important;
		padding: 0 !important;
	}

	#divMainWrapper {
		background-color: #ffffff !important;
	}

	section {
		flex-direction: column;
	}

	aside {
		width: 100%;
	}

	a {
		color: #000000 !important;
		text-decoration: underline !important;
	}

	h1,
	h2,
	h3,
	h4,
	h5,
	h6 {
		color: #000000 !important;
		page-break-after: avoid;
	}

	p {
		orphans: 3;
		widows: 3;
	}
}

/* Responsive table improvements */
@media (max-width: 768px) {
	table#tableManualTOCListing {
		font-size: 13px;
	}

	table#tableManualTOCListing th,
	table#tableManualTOCListing td {
		padding: 8px;
	}

	/* Hide less important columns on small screens */
	table#tableManualTOCListing .hide-mobile {
		display: none;
	}
}

@media (max-width: 480px) {

	/* Stack table for very small screens */
	table#tableManualTOCListing,
	table#tableManualTOCListing thead,
	table#tableManualTOCListing tbody,
	table#tableManualTOCListing th,
	table#tableManualTOCListing td,
	table#tableManualTOCListing tr {
		display: block;
	}

	table#tableManualTOCListing thead tr {
		position: absolute;
		top: -9999px;
		left: -9999px;
	}

	table#tableManualTOCListing tr {
		border: 1px solid var(--color-gray-300);
		margin-bottom: var(--spacing-sm);
		border-radius: var(--border-radius-sm);
		background-color: #ffffff;
	}

	table#tableManualTOCListing td {
		border: none;
		border-bottom: 1px solid var(--color-gray-200);
		position: relative;
		padding: var(--spacing-sm) var(--spacing-sm) var(--spacing-sm) 35%;
	}

	table#tableManualTOCListing td:before {
		content: attr(data-label);
		position: absolute;
		left: var(--spacing-sm);
		width: 30%;
		padding-right: var(--spacing-sm);
		white-space: nowrap;
		font-weight: 500;
		color: var(--color-gray-700);
	}
}

/* ========================================
   RESPONSIVE LAYOUT
   ======================================== */

/* Desktop layout - ensure aside elements are side by side */
@media (min-width: 769px) {

	/* Hide the hamburger menu button on desktop */
	header nav div.divResponsiveCSSNav label.labelResponsiveCSSNavToggle {
		display: none;
	}

	/* Force responsive navigation to be visible on desktop */
	header nav div.divResponsiveCSSNav input#inputResponsiveCSSNavControl~ul {
		display: block !important;
		position: static !important;
		background-color: transparent !important;
		border: none !important;
		box-shadow: none !important;
		min-width: auto !important;
	}

	/* Reset menu item styles for desktop */
	header nav div.divResponsiveCSSNav ul li {
		display: inline-block !important;
		border-bottom: none !important;
	}

	header nav div.divResponsiveCSSNav ul li a {
		display: inline-block !important;
		padding: 12px 16px !important;
	}

	main section aside {
		flex: 1 1 calc(50% - 12px) !important;
		/* Two aside elements side by side on desktop, taking full width to force article below */
		min-width: 280px !important;
		/* Reduced minimum width for better flexibility */
	}

	/* Ensure article appears on a new line below aside elements */
	main section article {
		flex: 1 1 100% !important;
		order: 3 !important;
		/* Force article to new line after aside elements */
	}
}

/* Tablet and mobile layout adjustments */
@media (max-width: 768px) {
	main {
		flex-direction: column;
		gap: 16px;
		padding: 16px 8px;
	}

	main nav {
		width: 100%;
		order: -1;
		/* Place navigation above content */
	}

	section {
		gap: 12px;
	}

	main section aside {
		flex: 1 1 100%;
		min-width: 200px;
		/* Stack aside elements vertically on tablets and mobile, reduced minimum width */
	}

	main section article {
		order: 3;
		/* Article appears after both aside elements */
	}

	/* Ensure checkbox and radio labels work well on mobile */
	label:has(input[type="checkbox"]),
	label:has(input[type="radio"]),
	input[type="checkbox"]+label,
	input[type="radio"]+label,
	label.radio {
		flex-wrap: wrap;
		margin-bottom: 12px;
	}
}

/* ========================================
   EXISTING RESPONSIVE UTILITIES
   ======================================== */

/* Loading states */
.loading {
	opacity: 0.6;
	pointer-events: none;
	position: relative;
}

.loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 20px;
	height: 20px;
	margin: -10px 0 0 -10px;
	border: 2px solid var(--color-gray-300);
	border-top: 2px solid var(--color-primary);
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	0% {
		transform: rotate(0deg);
	}

	100% {
		transform: rotate(360deg);
	}
}

/* Alert styles */
.alert {
	padding: var(--spacing-md);
	border-radius: var(--border-radius-sm);
	margin-bottom: var(--spacing-md);
	border-left: 4px solid;
}

.alert-info {
	background-color: #e3f2fd;
	border-color: var(--color-info);
	color: #0d47a1;
}

.alert-success {
	background-color: #e8f5e8;
	border-color: var(--color-success);
	color: #137333;
}

.alert-warning {
	background-color: #fff3cd;
	border-color: var(--color-warning);
	color: #856404;
}

.alert-danger {
	background-color: #f8d7da;
	border-color: var(--color-accent);
	color: #721c24;
}

.alert-error {
	background-color: #fdf2f2;
	border-color: var(--color-accent);
	color: var(--color-accent);
}

/* Spacing utilities */
.mb-0 {
	margin-bottom: 0 !important;
}

.mb-1 {
	margin-bottom: var(--spacing-xs) !important;
}

.mb-2 {
	margin-bottom: var(--spacing-sm) !important;
}

.mb-3 {
	margin-bottom: var(--spacing-md) !important;
}

.mb-4 {
	margin-bottom: var(--spacing-lg) !important;
}

.mb-5 {
	margin-bottom: var(--spacing-xl) !important;
}

.mt-0 {
	margin-top: 0 !important;
}

.mt-1 {
	margin-top: var(--spacing-xs) !important;
}

.mt-2 {
	margin-top: var(--spacing-sm) !important;
}

.mt-3 {
	margin-top: var(--spacing-md) !important;
}

.mt-4 {
	margin-top: var(--spacing-lg) !important;
}

.mt-5 {
	margin-top: var(--spacing-xl) !important;
}

/* Text utilities */
.text-center {
	text-align: center !important;
}

.text-left {
	text-align: left !important;
}

.text-right {
	text-align: right !important;
}

.text-muted {
	color: var(--color-gray-600) !important;
}

.text-primary {
	color: var(--color-primary) !important;
}

.text-accent {
	color: var(--color-accent) !important;
}

.text-success {
	color: var(--color-success) !important;
}

.text-warning {
	color: var(--color-warning) !important;
}

.text-danger {
	color: var(--color-danger) !important;
}

/* Display utilities */
.d-none {
	display: none !important;
}

.d-block {
	display: block !important;
}

.d-inline {
	display: inline !important;
}

.d-inline-block {
	display: inline-block !important;
}

.d-flex {
	display: flex !important;
}

/* Flex utilities */
.flex-column {
	flex-direction: column !important;
}

.flex-row {
	flex-direction: row !important;
}

.justify-content-center {
	justify-content: center !important;
}

.justify-content-between {
	justify-content: space-between !important;
}

.align-items-center {
	align-items: center !important;
}

/* Very small screens - phone portrait */
@media (max-width: 480px) {
	main {
		padding: 12px 4px;
		gap: 8px;
	}

	section {
		gap: 8px;
	}

	main section aside {
		min-width: 150px;
		padding: 12px;
		/* Reduce padding on very small screens */
	}

	main section article {
		padding: 12px;
		/* Reduce padding on very small screens */
	}
}

/* Responsive utilities */
@media (max-width: 768px) {
	.d-md-none {
		display: none !important;
	}

	.d-md-block {
		display: block !important;
	}
}

@media (max-width: 480px) {
	.d-sm-none {
		display: none !important;
	}

	.d-sm-block {
		display: block !important;
	}
}

/* ========================================
   PAGE STATUS BANNERS
   ======================================== */
#divPageNotLive {
	background-color: var(--color-danger);
	color: #fff;
	text-align: center;
	padding: var(--spacing-md);
	border-radius: var(--border-radius-sm);
}

#divPageNotLive a {
	color: #ffffff;
	text-decoration: underline;
	font-weight: 600;
}

#divPageLive {
	background-color: var(--color-info);
	color: #ffffff;
	text-align: center;
	padding: var(--spacing-md);
	border-radius: var(--border-radius-sm);
}

#divPageLive a {
	color: #ffffff;
	text-decoration: underline;
	font-weight: 600;
}