/*
 * Phones and small tablets (up to 768px). Loaded after main.css and style.css.
 * Replaces the old 450/540/768px blocks of main.css (tiny 8-10px text, fixed pixel widths).
 * Wider screens are not affected.
 */

.menuToggle
{
	display: none;
}

@media (max-width: 768px)
{
	html
	{
		-webkit-text-size-adjust: 100%;
	}

	body, div, section, nav, p, footer, header, a, ul, li, td, th, label, span
	{
		font-size: 14px;
	}

	img
	{
		max-width: 100%;
	}

	/* Sticky footer off: on phones the footer is taller than 80px and covered the content. */
	#wrapper
	{
		height: auto !important;
		min-height: 0;
		margin: 0;
		background-attachment: scroll;
	}

	.push
	{
		display: none;
	}

	/* Header: logo row with a menu button; the menus open below it */
	#headerNavigation
	{
		height: auto;
		position: relative;
		padding: 8px 12px;
		min-height: 64px;
		background: rgba(255, 255, 255, 0.85);
		box-sizing: border-box;
	}

	#headerNavigation img.logo
	{
		position: static;
		height: 60px;
		vertical-align: middle;
	}

	#headerNavigation img.tu
	{
		position: static;
		height: 30px;
		margin-left: 8px;
		vertical-align: middle;
		max-width: calc(100vw - 230px);
		object-fit: contain;
	}

	.menuToggle
	{
		display: block;
		position: absolute;
		top: 16px;
		right: 12px;
		padding: 10px 14px;
		border: 0;
		border-radius: 4px;
		background: #003399;
		color: #FFFFFF;
		font-size: 14px;
		font-weight: bold;
		font-family: Verdana, Geneva, sans-serif;
		cursor: pointer;
	}

	#menu,
	#subMenu
	{
		display: none;
		position: static;
		width: auto;
		height: auto;
		line-height: normal;
		text-align: left;
		background: none;
		margin: 0 -12px;
	}

	#headerNavigation.open #menu,
	#headerNavigation.open #subMenu
	{
		display: block;
	}

	#headerNavigation.open #menu
	{
		margin-top: 8px;
		border-top: 2px solid #003399;
	}

	#headerNavigation .menu a,
	#subMenu .adminMenu a
	{
		display: block;
		margin: 0;
		padding: 12px 16px;
		font-size: 14px;
		border-bottom: 1px solid #C7E3F5;
		background: #DDF1FC;
	}

	#subMenu .adminMenu a
	{
		background: #FFFFFF;
		text-align: left;
		border-width: 0 0 1px 0;
		border-radius: 0;
	}

	#menu form
	{
		display: block;
		padding: 10px 16px;
		background: #DDF1FC;
	}

	#menu input
	{
		float: none;
		width: 100%;
		height: 40px;
		box-sizing: border-box;
		font-size: 16px; /* 16px stops iPhones zooming in on focus */
	}

	#menu .fb
	{
		float: none;
		margin: 0;
	}

	#menu .fb img
	{
		height: 24px;
		vertical-align: middle;
	}

	/* Home page slider */
	.coverSlider,
	#pictureMain
	{
		height: calc(100vw * 350 / 1260);
	}

	.coverSlider ul.slider
	{
		height: 100%;
	}

	#pictureMain ul.slider div
	{
		top: auto;
		bottom: 8px;
		right: 12px;
		width: calc(100% - 24px);
		font-size: 14px;
		text-shadow: 2px 2px #003399;
	}

	.coverSlider .dotsUI
	{
		bottom: 4px;
	}

	.coverSlider .dotsUI .dots
	{
		height: 10px;
		width: 10px;
		margin-left: 6px;
	}

	.rightArrow,
	.leftArrow
	{
		background-size: contain !important;
	}

	/* Breadcrumb */
	.pathway
	{
		padding: 8px 12px;
	}

	#pathInfo,
	.pathway .user
	{
		display: block;
		width: auto;
		left: 0;
	}

	.pathway .user
	{
		margin-top: 4px;
	}

	/* One column: content, then the sidebar */
	#content
	{
		float: none;
		width: auto;
		margin: 0 !important;
	}

	.main
	{
		padding: 0 12px 10px 12px !important;
	}

	#sidebar
	{
		float: none;
		clear: both;
		width: auto;
		padding: 0 12px;
		text-align: center;
	}

	section
	{
		padding: 6px 12px;
	}

	.left,
	.right
	{
		float: none;
		clear: both;
		width: 100%;
	}

	/* Home page boxes */
	.upperRow
	{
		display: block;
		width: auto;
		height: auto;
		margin: 12px 0;
	}

	.upperRow > h3
	{
		height: auto;
	}

	.upperRow li,
	.upperRow li a:link,
	.upperRow li a:visited
	{
		height: auto;
		min-height: 54px;
		border-bottom: 1px solid #E3EEF8;
	}

	.upperRow li a
	{
		height: auto;
		overflow: hidden;
	}

	.upperRow li img
	{
		width: 110px;
		height: 43px;
		object-fit: contain;
	}

	.ads,
	.ads.small,
	#social
	{
		display: inline-block;
		float: none;
		width: 45%;
		max-width: 250px;
		height: auto;
		margin: 6px 2%;
	}

	.ads img
	{
		height: auto;
	}

	/* Jobs and internships list */
	#jobsList
	{
		width: auto !important;
		height: auto !important;
	}

	#jobsList ul li
	{
		display: grid;
		grid-template-columns: 110px 1fr;
		grid-template-areas: "logo position" "logo employer" "logo dates";
		column-gap: 10px;
		padding: 8px;
		border-bottom: 1px solid #E3EEF8;
	}

	#jobsList ul li:has(.thead)
	{
		display: none;
	}

	#jobsList .cell
	{
		float: none;
		width: auto !important;
		height: auto !important;
		padding: 0 !important;
		display: block !important;
		line-height: 18px;
	}

	#jobsList .position
	{
		grid-area: position;
		font-weight: bold;
	}

	#jobsList .logo
	{
		grid-area: logo;
		align-self: center;
	}

	#jobsList .logo img,
	#jobsList ul li img
	{
		width: 110px;
		height: 43px;
		padding: 0;
		object-fit: contain;
	}

	#jobsList .employer
	{
		grid-area: employer;
	}

	#jobsList .dates
	{
		grid-area: dates;
		color: #666666;
	}

	/* Article, job and employer pages */
	.articlePreview
	{
		width: auto !important;
		padding: 0 12px;
		overflow-wrap: break-word;
		text-align: left;
	}

	.articlePreview iframe,
	.articlePreview video,
	.articlePreview table
	{
		max-width: 100%;
	}

	.articlePreview .jobLine .label,
	.articlePreview .jobLine .content
	{
		float: none;
		width: auto;
	}

	/* "label" is also a Bootstrap class (white text) when Bootstrap loads */
	.articlePreview .jobLine .label
	{
		display: block;
		padding: 0 0 2px 0;
		color: #003399;
		font-size: 14px;
		font-weight: bold;
		text-align: left;
		white-space: normal;
		border-radius: 0;
	}

	.post,
	.empl,
	.empl2
	{
		float: none;
		width: auto !important;
		height: auto;
		min-height: 64px;
		margin: 0 0 14px 0;
		overflow: hidden;
		clear: both !important;
	}

	.empl .image,
	.empl2 .image
	{
		width: 120px;
	}

	.empl img,
	.empl2 img
	{
		object-fit: contain;
	}

	/* Forms and staff tables */
	input.textbox,
	input.contacts,
	textarea.textbox,
	textarea.contacts,
	#login input.textbox,
	#passForm input.textbox,
	.filter input.hintbox,
	.filter select
	{
		width: 100% !important;
		max-width: 100%;
		height: auto;
		min-height: 36px;
		box-sizing: border-box;
		font-size: 16px;
	}

	textarea.textbox,
	textarea.contacts
	{
		min-height: 120px;
	}

	.filter > *
	{
		margin-bottom: 6px;
	}

	/* Form tables (label | field rows): one under the other */
	table.full
	{
		width: 100% !important;
	}

	table:has(tr.line) > tbody > tr > th,
	table:has(tr.line) > tbody > tr > td
	{
		display: block;
		width: auto !important;
		padding: 2px 6px;
	}

	table:has(tr.line) > tbody > tr > th
	{
		padding-top: 10px;
	}

	/* Other tables (staff lists) scroll sideways instead of widening the page */
	.main table:not(:has(tr.line)),
	.ui-dialog table:not(:has(tr.line))
	{
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	/* TinyMCE editors */
	table.mceLayout,
	.mceIframeContainer iframe
	{
		width: 100% !important;
	}

	/* the toolbar scrolls sideways instead of widening the page */
	td.mceToolbar > div
	{
		max-width: calc(100vw - 60px);
		overflow-x: auto;
	}

	.overflow
	{
		width: auto !important;
	}

	/* jQuery UI dialogs (change password, apply, staff editors) */
	.ui-dialog
	{
		max-width: calc(100vw - 16px);
		left: 8px !important;
		box-sizing: border-box;
	}

	.ui-dialog .ui-dialog-content
	{
		overflow-x: auto;
	}

	.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset
	{
		float: none;
		text-align: center;
	}

	.imageDialog .image,
	.imageDialog .image img
	{
		height: auto;
		max-height: 70vh;
		max-width: 100%;
	}

	div.imageDialog .arrow
	{
		top: 40%;
		height: 60px;
	}

	div.imageDialog .arrow a
	{
		height: 60px;
		width: 40px;
		background-size: contain !important;
	}

	div.specialGallery ul li
	{
		width: calc(50% - 24px);
		margin: 5px;
	}

	/* Footer */
	footer
	{
		height: auto;
	}

	#footer
	{
		padding: 12px;
	}

	footer .links
	{
		padding: 6px 0;
	}

	footer .links a,
	footer .links a:last-of-type
	{
		display: block;
		float: none;
		margin: 0;
		padding: 8px 12px;
	}
}
