/**
 * SteveFryatt.org.uk
 * (c) Stephen Fryatt, 2015-2020
 *
 * Base Stylesheet
 */

/* Top Level Page Body. */

BODY {
	font-family: Arial, Tahoma, Helvetica, sans-serif;
	font-size: 100%;
	font-weight: normal;
	font-style: normal;
	text-decoration: none;

	color: black;
	background: white;
	margin: 0;
	padding: 0;
	font-size: normal;
	min-width: 320px;
}  

/* Page Header Bar (Title & Cog Logo) */

@media (max-width: 549px) {
	#header {
		font-size: 2em;
		margin: 0px;
		background-color: white;
		color: #193f90;
		text-align: left;
		padding: 5px 5%;
		height: 170px;
	}

	/* Decide which header we show and adjust the vertical position
	 * of the components accordingly.
	 */

	#header1 {
		display: none;
	}

	#header2 {
		display: none;
	}

	#header P.header {
		margin: 25px 0px 0px 0px;
		padding: 0px;
		float: right;
	}

	#header H1.header {
		margin: 10px 0px 0px 0px;
		padding: 0px;
	}

	/* Below 800px, don't display Tier 2 nav-bar links. */

	#navigation .tier2 {
		display: none;
	}
}

@media (min-width: 550px) and (max-width: 849px) {
	#header {
		font-size: 2em;
		margin: 0px;
		background-color: white;
		color: #193f90;
		text-align: left;
		padding: 5px 5%;
		height: 150px;
	}

	/* Decide which header we show and adjust the vertical position
	 * of the components accordingly.
	 */

	#header1 {
		display: none;
	}

	#header3 {
		display: none;
	}

	#header P.header {
		margin: 20px 0px 0px 0px;
		padding: 0px;
		float: right;
	}

	#header H1.header {
		margin: 18px 0px 0px 0px;
		padding: 0px;
	}

	/* Below 800px, don't display Tier 2 nav-bar links. */

	#navigation .tier2 {
		display: none;
	}
}


@media (min-width: 850px) {
	#header {
		font-size: 2em;
		margin: 0px;
		background-color: white;
		color: #193f90;
		text-align: left;
		padding: 5px 5%;
		height: 130px;
	}

	/* Decide which header we show and adjust the vertical position
	 * of the components accordingly.
	 */

	#header2 {
		display: none;
	}

	#header3 {
		display: none;
	}

	#header P.header {
		margin: 17px 0px 0px 0px;
		padding: 0px;
		float: right;
	}

	#header H1.header {
		margin: 35px 0px 0px 0px;
		padding: 0px;
	}
}

#header IMG.header {
	margin: 0px;
	padding: 0px;
}

/* Navigation Bar */

#navigation {
	font-size: 1em;
	line-height: 30px;
	background-color: #ccccff;
	color: #193f90;
	padding: 0 5%;
	border-style: solid;
	border-width: 4px 0px;
	border-color: #193f90;
}

#navigation UL {
	list-style-type: none;
	margin: 0px;
	padding: 0px;
}

#navigation LI {
	text-align: center;
	vertical-align: middle;
	display: inline-block;
}

#navigation A {
	background-color: #ccccff;
	color: #193f90;
	font-weight: bold;
	text-decoration: none;
	padding: 4px 5px;
	display: block;
}

#navigation A:visited {
	text-decoration: none;
	color: #193f90;
}

#navigation A:hover {
	background-color: #193f90;
	color: #ccccff;
}

/* Side/Footer Bar */

/* Below 800px, we show the sidebar at the end of the page. */

@media (max-width: 799px) {

	/* The Main Block Outer Container. */

	#main-container {
		padding: 5px 5%;
	}

	/* The Main Block Table Items. */

	#main-columns {
		text-align: left;
		width: 100%;
		padding: 0;
	}

	/* Main Page Content. */

	#content {
		width: 100%;
	}

	/* Sidebar Content. */

	#sidebar {
		width: 100%;
		text-align: center;
	}

	/* Sidebar Divider Heading. */

	#sidebar H1 {
		clear: both;
		width: calc(100% - 20px);
		border-radius: 5px;
		margin-top: 1.5em;
		margin-bottom: 0em;
		text-align: center;
		font-size: 1.2em;
		font-weight: bold;
		background: #ccccff;
		color: #193f90;
		padding: 0.5em;
		display: inline-block;
	}

	/* An information box-out panel. */

	div.panel {
		position: relative;
		margin: 2em 2% 2em 2%;
		padding: 1em;
		border: 3px solid #193f90;
		border-radius: 5px;
		color: #193f90;
		background: #ccccff;
		font-size: 1em;
	}
}

/* Above 800px, we show the sidebar at the side. */

@media (min-width: 800px) {
	/* The Main Block Outer Container. */

	#main-container {
		padding: 5px 5%;
	}

	/* The Main Block Table Items. */

	#main-columns {
		display: table;
		text-align: left;
		width: 100%;
		padding: 0;
	}

	/* Main Page Content. */

	#content {
		display: table-cell;
		vertical-align: top;
	}

	/* Sidebar Content. */

	#sidebar {
		display: table-cell;
		vertical-align: top;
		width: 180px;
		padding-left: 50px;
		text-align: center;
	}

	/* Sidebar Divider Heading. */

	#sidebar H1 {
		clear: both;
		width: calc(180px - 1em);
		border-radius: 5px;
		margin-top: 1.5em;
		margin-bottom: 0em;
		text-align: center;
		font-size: 1em;
		font-weight: bold;
		background: #ccccff;
		color: #193f90;
		padding: 0.5em;
		display: inline-block;
	}

	/* An information box-out panel. */

	div.panel {
		position: relative;
		margin: 2em 5em 2em 5em;
		padding: 1em;
		border: 3px solid #193f90;
		border-radius: 5px;
		color: #193f90;
		background: #ccccff;
		font-size: 1em;
	}
}

#sidebar P {
	margin-top: 1em;
	margin-bottom: 0.5em;
	text-align: center;
}

div.panel h1 {
	margin-top: 0px;
	padding-top: 0px;
}

div.panel h2 {
	font-size: 1.2em;
	margin-top: 0px;
	padding-top: 0px;
}

div.panel p:first-child {
	margin-top: 0px;
	padding-top: 0px;
}

div.panel p:last-child {
	margin-bottom: 0px;
	padding-bottom: 0px;
}

/* The Page Copyright Footer */

#footer {
	background-color: #ccccff;
	color: #193f90;
	clear: both;
	text-align: center;
	font-weight: bold;
	font-size: 1.0em;
	padding: 5px 5%;
	border-style: solid;
	border-width: 4px 0px;
	border-color: #193f90;
}

#footer P {
	margin: 0.2em;
}

#footer A {
	color: #193f90;
}

/* Balancing Margin. */

/* Below 1300px, we drop the left-hand margin. */

@media (max-width: 1299px) {
	

	#content-body {
		vertical-align: top;
		text-align: left;
		padding: 0px 0px 0px 0px;
		width: 100%
	}

	#navigation .tier3 {
		display: none;
	}
}

/* At 1300px and above, we put a complimentary margin on the left. */

@media (min-width: 1300px) {
	#content-body {
		vertical-align: top;
		text-align: left;
		padding: 0px 0px 0px 0px;
		float: right;
		width: calc(100% - 220px);
	}
}

/* Image Selection. */

@media (max-width: 999px) {
	/* Whether Wide or Narrow Inline Images are shown. */

	.wide-images {
		display: none;
	}

	div.image-left {
		margin: 1em 0em;
		text-align: center;
	}

	div.image-right {
		margin: 1em 0em;
		text-align: center;
	}
}

@media (min-width: 1000px) {
	/* Whether Wide or Narrow Inline Images are shown. */

	.narrow-images {
		display: none;
	}

	/* Flotaed images. */

	div.image-left {
		float: left;
		margin: 0em 1em 1em 0em;
	}

	div.image-right {
		float: right;
		margin: 0em 0em 1em 1em;
	}

}

/* Styles for forms. */

INPUT.action {
	color: #193f90;
	font-weight: bold
}

/* Styles for the login page. */

table.login-form {
	margin: 3em auto;
}

p.login-error {
	text-align: center;
	color: #ff0000;
}

/* Heading Styles */

h1 {
	font-size: 2em;
	font-weight: bold;
	color: #193f90;
}

h2 {
	font-size: 1.5em;
	font-weight: bold;
	text-decoration: none;
	color: #193f90;
}

h3 {
	font-size: 1.2em;
	font-weight: bold;
	text-decoration: none;
	color: #193f90;
}

h4 {
	font-size: 1em;
	font-weight: bold;
	text-decoration: none;
	color: #193f90;
}

/* Link Styles */

a {
	text-decoration: underline;
	color: #193f90;
}

a:visited {
	text-decoration: underline;
	color: #193f90;
}

a:hover {
	text-decoration: underline;
	color: #193f90;
}

/* Generic Styles. */

address {
	font-weight: bold;
	font-style: normal;
	padding-left: 0.5em;
	border-left: solid #ccccff 0.5em;
}

img {
	border: 0;
}

span.phone {
	font-weight: bold;
}

p.small-print {
	font-size: 0.9em;
	text-align: center;
}

span.date {
	font-weight: bold;
}

/* Attribution line for the head of an article. */

p.attribution {
	font-style: italic;
}

/* Author's name in an attribution. */

p.attribution span.name {
	font-weight: bold;
}

/* Centre a block of something. */

div.centred {
	margin: 0.8em 0em;
	text-align: center;
}

/* Inline Videos. */

div.video {
	overflow: hidden;
	padding-bottom: 56.25%;
	position: relative;
	height: 0;
}

div.video iframe {
	left:0;
	top:0;
	height:100%;
	width:100%;
	position:absolute;
}

/* File Download Block. */

div.download {
	border-left: solid #193f90 0.5em;
	min-height: 50px;
}

div.download > img {
	float: left;
	margin: 8px;
}

div.download > div.dl-title {
	margin: 8px 0.5em 0.1em 50px;
	padding-top: 8px;
	font-weight: bold;
}

div.download > div.dl-link {
	margin: 0.1em 0.5em 0.5em 50px;
}
