/* dac_basic.css
 *	Basic site-wide styling.
 *	Digital Accessibility Centre 2020
 *	By Andrew Northmore-Thomas | https://andrew.northmore-thomas.co.uk
*/

/*	For a list of google fonts see:
	https://www.w3schools.com/howto/howto_google_fonts.asp
*/

/* ***************************************************************** */
/* The Basics */
* {
/* We'll define our own margin-top/margin-bottom */
	margin-block-start: 0px;
    margin-block-end:   0px;
/* Base font-size to be large enough to read well */	
	font-size: 16pt;
}

body {
	background-color: #000000;
	z-index: 0;
	position: relative;
}

button, img {
/* buttons and images will never 
   be in the middle of anything */
	margin-bottom: 10px;
}


header, nav, main, footer, #copyright {
	z-index: 1;
	margin-bottom: 1em;
	display: block;
	/* For testing 
	border: 1px solid Grey;
	*/
}

header {
	border-bottom: 2px solid black;
}

main {
	background-color: #EEEEEE;
	color: black;
	border: none;
  	outline: none;
}

footer {
	border-top: 2px solid black;
}

#copyright {
	background-color: black;
	color: white;
	width: 100%;
}
#copyright span {
	float: right;
}

p {
	margin-bottom: 1em;
}

img {
	border: 2px solid Black;
	width: 90%;
	height: auto;
}

dl {
	width: 98%;
}



/* ******************************************** */
/* Popups */
/* 
NOTE: These only work with dac_basic.js
<script src="./dac_basic.js"></script>

Stored in the popupArea, popups are all children <div>s.
Each popup needs its own child div with a class of "overlay", 
and aother child div with a role of "dialog" and a "tabindex=-1"; 
it should contain a h2 heading.

To activate a popup, set the class of the popup element to "active"
Change the class to null (i.e. "") to deactivate it.
*/

#popupArea {
/* section for storing popups */
    position: absolute;
    top:  0px;
    left: 0px;
    height: 100%;
    width: 100%;
    background-color: rgba(0, 0, 0, 0);
    z-index: 50; /* all popups will be 50 + array.length! see DAC_basic.js Popups */
	display: none;
}

#popupArea > div {
	display: none; /* hidden from the start */
	
	background-color: #FFFFFF;
	margin: 2em;
	position: absolute;
	top: 5em;
	left: 5em;
}
#popupArea > div.active {
	display: block;
}

.popupArea > div > div.overlay {
	/* overlay for dialogs */
	postion: fixed;
	top: 0px; left: 0px;
	height: 100%;
	width: 100%;
	background-color: #000000;
	opacity: 0.2;
	display: none;
}
.popupArea > div.active > div.overlay {
	display: block;
}

#popupArea > div > div[role=dialog] {
	background-color: #EEEEEE;
	opacity: 1;
	margin: 0.5em;
	width: 14em;
	height: 7.5em;
}

/* ******************************************** */


/* ******************************************** */
/* Basic style fixes */
em {
	font-weight: 600;
	font-style: normal;
}

/* border for Windows' "High Contrast Mode" */
* {
	border: 2px solid rgba(0, 0, 0, 0);
}

/* Hover extra indicator (Remove underline)*/

a[href]:hover {
	text-decoration: none;
}

/* Mkae buttons "Depress" when activated */
button {
	border: 2px solid black;
	box-shadow: 5px 5px #888888;
}
button:active {
	position: relative;
	border: 2px solid black;
	top: +2px; left: +2px;
	box-shadow: 3px 3px #888888;
}

/* Change pointer for form elements */
input:hover, select:hover, button:hover, textarea:hover,
*[role=button], *[role=checkbox], *[role=radio], *[role=textbox],
*[role=search], *[role=slider] {
	cursor: pointer;
}

/* No pointer change for disabled elements */
*[disabled], *[disabled=”disabled”], *[disabled=”true”] {
  cursor: default!important;
  background-color: LightGray;
  color: DarkGrey;
}


/* Focus indicator */
a:focus,
area[href]:focus,
input:focus,
select:focus,
textarea:focus,
button:focus,
iframe:focus,
[tabindex=0]:focus,
[contentEditable=true]:focus,
[role=button], 
[role=checkbox], 
[role=checkbox]+label, 
[role=radio],
[role=radio]+label, 
[role=textbox],
[role=search], 
[role=slider],
.addFocus:focus
{
    outline-width: 2px;
    outline-style: solid;
    outline-color: #FD5200;
}

/* Equal Hover */
area[href]:hover,
input:hover,
select:hover,
textarea:hover,
button:hover,
[tabindex=0]:hover,
[contentEditable=true]:hover,
[role=button]:hover, 
[role=checkbox]:hover, 
[role=checkbox]:hover+label, 
[role=checkbox]+label:hover, 
[role=radio]:hover,
[role=radio]:hover+label,
[role=radio]+label:hover,
[role=textbox]:hover,
[role=search]:hover, 
[role=slider]:hover,
.addFocus:hover
{
    outline-width: 2px;
    outline-style: solid;
    outline-color: #FD5200;
}
/* ***************************************************************** */
/* The Alternate Areas */
.code {
	font-family: "Courier New", Courier, monospace;
	padding: 1em;
}

.alert {
	border: 2px solid DarkRed;
	display: none;
	padding: 1em;
}
.alert.active {
	display: block;
}

.sr-only {   
  position:    absolute !important;
  overflow:    hidden   !important; 
  white-space: nowrap   !important;
  width:   1px !important; 
  height:  1px !important; 
  margin: -1px !important; 
  padding: 0   !important; 
  border:  0   !important; 
  clip: rect(1px, 1px, 1px, 1px) !important;
        -webkit-clip-path: inset(50%) !important;
        clip-path: inset(50%) !important;
}

/* ***************************************************************** */
/* Skippy */

/* The basic HTML
<div class="skipLink">
  <a href="#maincontent">Skip to main content</a>
</div>

<main id="maincontent" tabindex=-1>
*/

.skipLink {
  position: absolute!important;
  overflow: hidden;
  margin:   0px;
  top:     -1px;
  width:    1px;
  height:   1px;
  background-color: #FFFF66;
}

.skipLink:focus-within {
	top:      auto;
	width:    10em;
	height:   1.5em;
	margin:   auto;
	overflow: auto;
	margin: 1em;
    border:   2px solid black;
}

.skiplink > a {
	outline: none;
	border: none;
}

/* ***************************************************************** */
/* Tooltips */
/* 
Must include dac_tooltip.js 
<script src="./dac_tooltip.js"></script>
*/
/* The basic HTML
<body>
This is an example of a tooltip by the 
<abbr class="ng-scope tooltip" tabindex=0 aria-hidden="true"> DAC </abbr>
<span role="tooltip" class="">Digital Accessibility Centre</span>
that pass the WCAG 2.1 Success Criterion 1.4.13: Content on Hover or Focus.

<script>setTooltipEvents();</script>
</body>
*/

.hasTooltip + span {
	color: black;
	background-color: #FFFFC0;	
	display: inline;
	position: absolute;			
	height:   1px;
	margin:  -1px;
	padding:  0;
	overflow: hidden;
	border:   0;
	z-index:  10;
}
		
. hasTooltip [tooltip=active] + span,  
. hasTooltip + span:hover {
	border:  2px solid black;
	height:  auto;
	margin:  auto;
	top:     1em;
}


/* ***************************************************************** */
/* *** Structure *** */

/* Position */
.left {
    float: left;
}
.right {
    float: right;
}

dt, dl {
	float: left;
	display: inline-block;
}

.left-largeScreenOnly, .right-largeScreenOnly {
	/* at basic, display as a block */
	display: block;
}
@media only screen and (min-width: 800px) {
/* Large screen only */
	.left-largeScreenOnly {
		float: left;
		display: inline;
	}
	.right-largeScreenOnly {
		float: right;
		display: inline;
	}
}

/* Header/footer Section Structure */
nav.main {
	width: 100%
}
nav.main > div {
	display: inline;
}
ul.linksList {
	padding: 0px;
}
ul.linksList , ul.linksList  > li {
	/* navigation links lists - give role="presentation"*/
	list-style: none;
	display: block;
}
@media only screen and (min-width: 800px) {
/* Large screen only */
    nav ul.linksList > li {
	    display: inline;
	}
}

.horizontal {
	display: block;
}

@media only screen and (min-width: 800px) {
/* Large screen only */
	.horizontal {
		display: inline !important;
	}
	ul.horizontal > li {
		display: inline !important;
	}
	ul.linksList.horizontal {
		padding-right: 100px;
	}
}

/* Main section structure */

main > .section {
	display: block;
}
main > .section > h2{
}
.column-1, .column-2, .column-3 {
	display: inline-block;
	float: left;
}
@media only screen and (min-width: 800px) {
/* Large screen only */
	.column-1 {
		width: 30%;
	}
	.column-2 {
		width: 65%;
	}
	.column-3 {
		width: 95%;
	}
}
/* Clear floats */
header:after, nav:after, main:after, footer:after, 
.section:after, dl:after, #copyright:after {
  content: "";
  display: table;
  clear: both;
}

.card {
	position: relative;
	top: 	  0px;
	left:     0px;
	height:   100%;
	width:    100%;
	float: 	  left;
	display:  block;
}
.card > div {
	background-color: #FFFFFF;
	border:   2px solid DarkGrey;
}
.card:hover, .card:focus-within {
	border-color: Black;
}
.card img {
	display: block;
	height: auto;
	
}
.card * {
	margin-left:  10px;
	margin-right: 10px;
}

.card h3 {
	/* width: auto;
	display: inline; */
	text-align: center;
}

@media only screen and (min-width: 800px) {
/* Large screen only */
	.card {
		width: 30%;
		max-width: 30%;
		margin-left:  1%;
		margin-right: 1%;
		display: inline;
		height: 100%;
		min-height: 100%;
	}
}

/* ******************************************** */







