/************************************************************************************************************
 * general page styling
 ************************************************************************************************************/
html {
	min-height: 100%;
}

/* create an overall margin */
body {
	min-height: 100vh;
	margin: 20px;
}

/* main section - overall page content block beneath header */
main {
	width: 100%;
}

/* article - used to cover working page content */
article {
	position: relative;
	width: 80%;
	height: auto;
	border-radius: 10px;
	padding-bottom: 2px;
	margin-top: 12px;
}

fieldset {
	border: none;
	padding-top: 5px;
	padding-bottom: 5px;
	padding-left: 0;
	padding-right: 0;
}

label {
	font-family: 'Source Sans Pro';
	font-weight: 700;
	font-size: 14px;
	color: #19832b;
	line-height: 18px;
}

.font_14 {
	font-size: 14px;
}

.font_18 {
	font-size: 18px;
}

.label_align {
	font-family: 'Source Sans Pro';
	font-weight: 500;
	font-size: 16px;
	display: block;
}

.label_large {
	font-family: 'Source Sans Pro';
	font-weight: 200;
	font-size: 20px;
	color: #89ae3f;
	display: block;
}

.color_black {
	color: black;
}

.color_grey {
	color: grey;
}

.color_dark_green {
	color: #19832b;
}

.color_light_green {
	color: #89ae3f;
}

.margin_left_12 {
	margin-left: 12px;
}

.feedback {
	font-family: 'Source Sans Pro';
	font-weight: 200;
	font-size: 20px;
}

legend {
	font-family: 'Source Sans Pro';
	font-weight: 700;
	font-size: 20px;
	color: #89ae3f;
	margin-left: 12px;
	letter-spacing: -0.3px;
}

/* div inside a fieldset */
fieldset div {
	margin-left: 12px;
}

/* div inside div */
div div {
	margin-left: 0;
}

/* table inside a fieldset */
fieldset table {
	margin-left: 12px;
}

/* section followed by section */
section + section {
	margin-top: 35px;
}

/* fieldset followed by fieldset */
fieldset + fieldset {
	margin-top: 20px;
}

/* format for general paragraphs */
p {
	margin-top: 6px;
	margin-bottom: 6px;
	margin-left: 5px;
	margin-right: 5px;
}

/* format for strong styling - green */
strong {
	color: #19832b;
	font-family: 'Source Sans Pro';
	font-size: 28px;
	font-style: normal;
	padding: 0;
	border: 0;
}

/* highlight required fields */
abbr {
	color: red;
}

/* give margin to text areas */
textarea {
	padding-right: 10px;
	padding-left: 4px;
	margin-left: 12px;
}

/* generate a ? in a circle (for a tooltip) after the element */
.circle::after {
    content: '?';
    display: inline-block;
    font-family: 'Source Sans Pro';
    font-weight: bold;
    text-align: center;
    font-size: 0.8em;
    line-height: 0.8em;
    border-radius: 50%;
    margin-left: 6px;
    padding: 0.13em 0.2em 0.09em 0.2em;
    color: inherit;
    border: 1px solid;
    text-decoration: none;
}

details {
	border: 1px solid #aaa;
	border-radius: 4px;
	padding: 0.5em 0.5em 0;
}

summary {
	font-weight: bold;
	margin: -0.5em -0.5em 0;
	padding: 0.5em;
}

details[open] {
	padding: 0.5em;
}

/* hide circle title by default */
.circle label[title] {
	visibility: hidden;
}

/* if hovering over circle - unhide title */
.circle label[title]:hover {
	visibility: visible;
}

.tooltip {
  position: relative;
 /* display: inline-block; */
  border-bottom: 2px dotted #666;
}


.tooltip .tooltiptext {
	visibility: hidden;
	width: 15em;
	background-color: #555;
	color: #fff;
	text-align: center;
	border-radius: 6px;
	position: absolute;
	z-index: 1;
	top: 105%;
	left: 0%;
	margin-top: 5px;
	margin-left: 0;
	opacity: 0;
	transition: opacity 0.3s;
	padding: 0;
}

/* tooltip arrow to the left of the tooltip */
.tooltip .tooltiptext::after {
	content: " ";
	position: absolute;
	bottom: 100%;
	left: 5%; /* To the top left of the tooltip */
	border-width: 5px;
	border-style: solid;
	border-color: transparent transparent #555 transparent;
}

.tooltip:hover .tooltiptext {
	visibility: visible;
	opacity: 1;
}


/************************************************************************************************************
 * warning - centre text and make it red
 ************************************************************************************************************/
.warning {
	text-align: center;
	color: red;
	border: 2px solid red;
	border-radius: 10px;
	height: auto;
}

/* make warning strong red */
.warning strong {
	color: red;
}

/************************************************************************************************************
 * error - in general errors will be red
 ************************************************************************************************************/
.error {
	color: red;
	font-family: 'Source Sans Pro';
}

/* general styling for buttons (typically at bottom right of forms) */
.button {
	width: 80px;
	height: 30px;
}

.lrg_button {
	width: 120px;
	height: 35px;
}

/* align label text containing input */
.label_input {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

/* set some std display widths for widgets */
/* text input */
.w250 {
	min-width: 50%;
	width: 100%;
	cursor:pointer;
	padding-right: 0;
}

.w266 {
	min-width: 50%;
	width: 100%;
	cursor:pointer;
}

/* standard grid (2 cols) */
.grid {
	display: grid;
	height: auto;
	margin-right: 6px;
	column-gap: 10px;
	row-gap: 8px;
	align-items: center;
	grid-template-columns: minmax(100px, 1fr) minmax(100px, 1fr);
}

.grid_1_col {
	display: grid;
	height: auto;
	margin-right: 6px;
	column-gap: 10px;
	align-items: center;
	grid-template-columns: minmax(230px, 50%);
}


/* grids with different numbers of rows */
.grid_msg {
	grid-template-rows: auto;
}

.grid_1 {
	grid-template-rows: 30px;
}

.grid_2 {
	grid-template-rows: 30px 30px;
}

.grid_3 {
	grid-template-rows: 30px 30px 30px;
}

.grid_4 {
	grid-template-rows: 30px 30px 30px 30px;
}

.grid_5 {
	grid-template-rows: 30px 30px 30px 30px 30px;
}

.grid_6 {
	grid-template-rows: 30px 30px 30px 30px 30px 30px;
}

.grid_7 {
	grid-template-rows: 30px 30px 30px 30px 30px 30px 30px;
}

.grid_8 {
	grid-template-rows: 30px 30px 30px 30px 30px 30px auto auto;
}

/* create some row/col positioning classes for grid elements */
.grid_r1 {
	grid-row: 1;
}

.grid_r2 {
	grid-row: 2;
}

.grid_r3 {
	grid-row: 3;
}

.grid_r4 {
	grid-row: 4;
}

.grid_r5 {
	grid-row: 5;
}

.grid_r6 {
	grid-row: 6;
}

.grid_r7 {
	grid-row: 7;
}

.grid_r8 {
	grid-row: 8;
}

.grid_r9 {
	grid-row: 9;
}

.grid_c1 {
	grid-column: 1;
}

.grid_c2 {
	grid-column: 2;
}

.grid_c3 {
	grid-column: 3;
}

/* col 4 intended to be for buttons */
.grid_c4 {
	grid-column: 4;
	margin: auto;
}

/* allow an item to span multiple cols */
.grid_c1-3 {
	grid-column: 1 / span 3;
}

/* allow an item to span all cols */
.grid_c-all {
	grid-column: 1 / -1;
}

/************************************************************************************************************
 * style the password strength meter
 ************************************************************************************************************/
meter {
	width: 100%;
	height: 30px;
	background-color: lightgrey;
}

meter[value="1"]::-webkit-meter-optimum-value {
	background: red;
}
meter[value="2"]::-webkit-meter-optimum-value {
		background: yellow;
}
meter[value="3"]::-webkit-meter-optimum-value {
	background: orange;
}
meter[value="4"]::-webkit-meter-optimum-value {
	background: green;
}

meter[value="1"]::-moz-meter-bar {
	background: red;
}
meter[value="2"]::-moz-meter-bar {
	background: yellow;
}
meter[value="3"]::-moz-meter-bar {
	background: orange;
}
meter[value="4"]::-moz-meter-bar {
	background: green;
}


/************************************************************************************************************
 * wait cursor
 ************************************************************************************************************/
/* when there is no wait class this div is invisible */
#overlay {
	position: fixed;
	display: none;
	width: 0%;
	height: 0%;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0,0,0);
	z-index: 2;
	cursor: pointer;
}

/* when wait class is added (via submit) - grey the window and set a wait cursor */
#overlay.wait {
	position: fixed;
	display: block;
	width: 100%;  /* full width (cover the whole page) */
	height: 100%; /* full height (cover the whole page) */
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0,0,0,0.4); /* grey background using opacity */
	z-index: 500; /* ensure div is on top */
	cursor: wait; /* apply wait pointer when wait class is added */
}

.readonly {
	height: 25px;
	background-color: #aef4d3;
	color: black;
	padding-right: 10px;
	padding-left: 4px;
	border: 1px solid grey;
	border-radius: 5px;
}

.opw_wrap {
	display: flex;
	flex-direction: row;
	padding: 0;
	padding-left: 2px;
	max-width: 100%;
}


.opw {
	flex-grow: 2;
	border: 1px solid grey;
	height: 22px;
	padding: 0px 2px;
}

.opw:focus {
	outline: none;
}

.opwb {
	padding: 0;
	height: 24px;
	border: 1px solid grey;
}
