@charset "utf-8";
/*
 * Mobile / small-screen layer for the "mobile" template.
 * Loaded after bootstrap, style.css and dashboard.css (see header.inc.php), so it
 * only has to undo the fixed desktop widths of the older stylesheets.
 */

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

/* Tables that are wider than their container scroll sideways instead of
   pushing the whole page wide. Added by responsive.js. */
.table-scroll {
	width: 100%;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

/* ------------------------------------------------------------------ */
/* Profile page (information/personal, information/show)              */
/* responsive.js gathers the name banner, photo card and every        */
/* ".segment" panel of the page into .profile-layout:                 */
/*   .profile-layout > .studentname, .profile-body >                  */
/*                    (.profilepic, .profile-cols > panels)           */
/* Name banner on top, photo card on the left, panels in two          */
/* balanced columns beside it; one column on small screens.           */
/* ------------------------------------------------------------------ */
.profile-layout { clear: both; font-size: 13px; }
.profile-layout > .studentname {
	float: none !important;
	width: 100% !important;
	height: auto !important;
	margin: 0 0 20px !important;
	padding: 12px 20px !important;
	background-color: #3f821c !important;
	color: #fff;
	font-size: 20px;
	line-height: 1.3;
	text-transform: uppercase;
	box-sizing: border-box;
}
.profile-body {
	display: flex;
	align-items: flex-start;
	gap: 20px;
}
.profile-body > .profilepic {
	flex: 0 0 230px;
	float: none !important;
	width: 230px !important;
	margin: 0;
	background: #fff;
	box-sizing: border-box;
}
.profile-body > .profilepic img { display: block; width: 100%; }
.profile-cols {
	flex: 1 1 auto;
	min-width: 0;
	column-count: 2;
	column-gap: 20px;
}
.profile-cols > * {
	display: inline-block;
	float: none !important;
	width: 100% !important;
	margin: 0 0 20px !important;
	vertical-align: top;
	break-inside: avoid;
	-webkit-column-break-inside: avoid;
	box-sizing: border-box;
}

/* panel = .segment header + the block after it */
.profile-cols .segment {
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 12px 16px !important;
	background-color: #2f6a14;
	border-bottom: 3px solid #8cc152;
	color: #fff;
	font-size: 16px;
	font-weight: 600;
}
.profile-cols .segment a { color: #fff; font-size: 13px; }
.profile-cols .segment > div { width: auto !important; }
.profile-cols .profile-panel-body {
	width: auto !important;
	max-width: 100%;
	background: #fff;
	border: 1px solid #ddd;
	border-top: 0;
	padding: 12px 16px;
	box-sizing: border-box;
}
.profile-cols table { width: 100%; }
.profile-cols .profile-panel-body td { padding: 7px 12px 7px 0; vertical-align: top; font-size: 14px; line-height: 1.4; }
.profile-cols .profile-panel-body td:first-child { width: 200px !important; }
.profile-cols .profile-panel-body div { max-width: 100%; }
.profile-cols .profile-panel-body > div[style*="width"] { width: auto !important; }

/* narrower desktops and tablets: one column of panels beside the photo */
@media screen and (max-width: 1199px) {
	.profile-cols { column-count: 1; }
}

/* ------------------------------------------------------------------ */
/* Tablets and phones                                                 */
/* ------------------------------------------------------------------ */
@media screen and (max-width: 991px) {

	html, body { overflow-x: hidden; }

	/* header, sidebar drawer and #content spacing live in header.inc.php */

	/* undo fixed pixel widths from the desktop stylesheets */
	#content div,
	#content form,
	#content fieldset,
	#content ul,
	#content p,
	#content h1, #content h2, #content h3, #content h4 {
		max-width: 100%;
		box-sizing: border-box;
	}
	#content .float,
	#content .floatleft,
	#content .floater,
	#content .floatright {
		float: none !important;
		width: auto !important;
		margin-left: 0 !important;
		margin-right: 0 !important;
	}
	#content h1, #content h2, #content h3 { overflow-wrap: anywhere; }

	/* form controls fill the space they have */
	#content input[type="text"],
	#content input[type="password"],
	#content input[type="email"],
	#content input[type="number"],
	#content input[type="tel"],
	#content input[type="date"],
	#content input[type="file"],
	#content select,
	#content textarea,
	#content .dd-container,
	#content .dd-select,
	#content .dd-options {
		max-width: 100% !important;
		box-sizing: border-box;
	}
	/* ddSlick dropdowns set pixel widths inline */
	#content .dd-container,
	#content .dd-select,
	#content .dd-options { width: 100% !important; }
	#content .dd-selected-text,
	#content .dd-option-text {
		width: auto !important;
		max-width: 100%;
		white-space: normal;
		overflow-wrap: anywhere;
	}
	#content input[type="submit"],
	#content input[type="button"],
	#content button,
	#content .btn {
		max-width: 100%;
		white-space: normal;
	}

	/* tables: readable cells, horizontal scroll when still too wide */
	#content table { max-width: none; }
	#content td, #content th { word-break: normal; overflow-wrap: normal; }
	.table-scroll > table { min-width: 100%; }
	.table-scroll th, .table-scroll td.nowrap-cell { white-space: nowrap; }
	.table-scroll > table { margin-left: 0 !important; margin-right: 0 !important; }

	/* statement of results (statement/results, grades/personal):
	   660px header block + 700px "code | course | grade" tables, indented 30px */
	#content div[style*="width: 660px"] {
		width: auto !important;
		height: auto !important;
		padding-left: 0 !important;
	}
	#content div[style*="margin-left: 30px"] { margin-left: 0 !important; }
	#content div[style*="padding-left: 30px"] { padding-left: 0 !important; }
	#content table[style*="width: 700px"] {
		width: 100% !important;
		min-width: 0 !important;
		margin-top: 0 !important;
		font-size: 13px !important;
	}
	#content .table-scroll:has(> table[style*="width: 700px"]) { overflow-x: visible; }
	#content table[style*="width: 700px"] td { padding: 6px 6px 6px 0; vertical-align: top; white-space: normal !important; }
	#content table[style*="width: 700px"] td:first-child,
	#content table[style*="width: 700px"] td:last-child { white-space: nowrap !important; }
	#content table[style*="width: 700px"] tr.heading td { padding-top: 14px; border-bottom: 2px solid #3f821c; }
	#content table[style*="width: 700px"] tr.heading td:first-child { white-space: normal !important; }
	#content table[style*="width: 700px"] td.title { white-space: normal !important; color: #b42318; }
	#content .logo[style*="position: absolute"] { position: static !important; text-align: right; }
	#content .logo[style*="position: absolute"] img { max-width: 90px; }

	/* one-cell "box" tables just take the available width */
	table.layout-table,
	table.layout-table > tbody,
	table.layout-table > tbody > tr,
	table.layout-table > tbody > tr > td,
	table.layout-table > tr,
	table.layout-table > tr > td {
		display: block;
		width: 100% !important;
		box-sizing: border-box;
	}

	.footer .center { padding-left: 0 !important; }
	.footer .float { float: none; display: inline-block; vertical-align: top; }
}

@media screen and (max-width: 767px) {
	/* profile: everything stacks, photo card centred on top */
	.profile-layout > .studentname { font-size: 17px; padding: 12px 14px !important; }
	.profile-body { display: block; }
	.profile-body > .profilepic {
		width: 100% !important;
		max-width: 360px;
		margin: 0 auto 20px;
	}
	.profile-cols .profile-panel-body td:first-child { width: 130px !important; }

	body { font-size: 14px; }
	#content h1 { font-size: 1.35em; }
	#content h2 { font-size: 1.15em; line-height: 1.4; }

	table.form-stack,
	table.form-stack > tbody,
	table.form-stack > tbody > tr,
	table.form-stack > tbody > tr > td,
	table.form-stack > tbody > tr > th,
	table.form-stack > tr,
	table.form-stack > tr > td {
		display: block;
		width: 100% !important;
		box-sizing: border-box;
	}
	table.form-stack > tbody > tr > td,
	table.form-stack > tr > td { padding: 4px 0 !important; border: 0 !important; height: auto !important; }
	table.form-stack > tbody > tr { padding: 6px 0; border-bottom: 1px solid #eee; }
	table.form-stack tr.form-stack-head { display: none !important; }
	table.form-stack input[type="text"],
	table.form-stack input[type="password"],
	table.form-stack input[type="email"],
	table.form-stack input[type="number"],
	table.form-stack input[type="tel"],
	table.form-stack input[type="date"],
	table.form-stack select,
	table.form-stack textarea,
	table.form-stack .dd-container,
	table.form-stack .dd-select {
		width: 100% !important;
	}

	.footer { text-align: center; }
	.footer .float { display: block; padding-right: 0; }
}

@media print {
	.table-scroll { overflow: visible !important; }
}

/* Breadcrumb bar (all pages) */
.breadcrumb {
	background-color: rgb(204, 155, 55) !important;
}
.breadcrumb, .breadcrumb a, .breadcrumb a:hover { color: #fff; }

/* Student-only profile details hidden on staff/admin profiles (responsive.js) */
.profile-layout .profile-hidden { display: none !important; }

/* ------------------------------------------------------------------ */
/* Dashboard (home/show)                                              */
/* ------------------------------------------------------------------ */
#content > .greeter {
	height: auto !important;
	padding: 14px 20px !important;
	background-color: #3f821c;
	font-size: 20px;
	line-height: 1.3;
	box-sizing: border-box;
}
#content > .panel.panel-default {
	float: none !important;
	clear: both;
	width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 0 16px !important;
	padding: 16px !important;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
	position: static !important;
	color: inherit;
	overflow-wrap: anywhere;
}
#content > .panel.panel-default h2 { margin-top: 0; }
#content > .panel.panel-default table { width: 100% !important; }
#content > .panel.panel-default .table td { padding: 8px 6px; vertical-align: top; }
#content > .panel.panel-default .table td:last-child { white-space: nowrap; color: #6b7280; font-size: 12px; text-align: right; }

/* Quick links: tiles built by responsive.js from the sidebar menu */
.quick-links { display: none; margin: 0 0 18px; }
.quick-links h2 { margin: 0 0 10px; }
.quick-links-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 10px;
}
.quick-link {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 92px;
	padding: 12px 8px;
	text-align: center;
	text-decoration: none !important;
	color: #1f2933 !important;
	font-size: 13px;
	font-weight: 600;
	line-height: 1.25;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-bottom: 3px solid #3f821c;
	border-radius: 8px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .05);
}
.quick-link:active { background: #f1f5ef; }
.quick-link img, .quick-link svg { width: 28px; height: 28px; }
.quick-link .mailcount, .quick-link .pendingcount { display: none; }
@media screen and (max-width: 768px) {
	.quick-links { display: block; }
	.quick-links-grid { grid-template-columns: repeat(3, 1fr); }
}
@media screen and (max-width: 380px) {
	.quick-links-grid { grid-template-columns: repeat(2, 1fr); }
}
