@import url('https://fonts.googleapis.com/css?family=Fira+Sans');
@import url('https://fonts.googleapis.com/css?family=Open+Sans');
@import url('https://fonts.googleapis.com/css?family=Raleway');

:root {
	--color1: #003049; /* Dark Blue */
	--color2: #F77F00; /* Orange */
	--color3: #FCBF49; /* Yellow */
	--color4: #4CAF50; /* Green - Save Button */
	--color5: #D62828; /* Red */
	--color6: #1f1f28; /* Dark Grey */
	
	--highlight: var(--blue-secondary);
	
	--background: #E8E9EB;
	--block-background: #f5f5f5;
	
	--blue-secondary: #406477;
	--blue-tricady: #9fb1bb;
	
	--link: var(--blue-secondary);
	--linkHover: #414C57;
	
	--header-background: var(--color1);
	
	--menu-background: #284B63;
	--menu-background-hover: #d0d1d3;
	--menu-button: #e8e8e8;
	--menu-link: #000;
	--menu-border-selected: var(--blue-tricady);
	--menu-border-hover: var(--blue-secondary);
	--menu-link-selected: #FFF;
	--menu-block-selected: #f5f5f5;
	
	--dropdown-menu-background: #FFF;
	--dropdown-menu-border: #FFF;
	--dropdown-menu-link: #000;
	--dropdown-menu-link-hover-background: #000;
	--dropdown-menu-link-hover: #FFF;
	
	--tab-background: var(--blue-tricady);
	--tab-background-selected: var(--color1);
	--tab-text: #FFF;
	
	--button: var(--blue-secondary);
	--submit: #F77F00;
	--deleteHover: #B91515;
	
	--headerColor: #3d4449;
	--textColor: #888;
}

/* Standard Setup */

html, body, header, footer, div, nav, ul, ol, li, a, fieldset, menu, hgroup, h1, h2, h3, h4, h5 {
	padding: 0;
	margin: 0;
	border: 0;
}

body {
	background-color: var(--background);
	/*background-image: radial-gradient(farthest-side at 60% 55%, #FFF, #f5f5f5);*/
	font: 14px "Raleway", Verdana, sans-serif;
	color: var(--textColor);
	-webkit-text-size-adjust: none;
	box-sizing: border-box;
}

h1, h2, h3, h4 {
	margin-bottom: 1em;
	color: var(--headerColor);
}

h1 { 
	font-weight: bold;
	color: var(--color2);
	font-family:  'Open Sans', sans-serif; 
	font-size: 2em;
}

h1 span.subtitle {
	font-weight: normal;
}

h2 { font-size: 1.75em; }
h3 { font-size: 1.6em; }
h4 { font-size: 1.2em; }

hr {
	border: 0;
	border-bottom: solid 1px rgba(210, 215, 217, 0.75);
	margin: 2em;
}


a, a:visited {
	color: var(--link);
	text-decoration: none;
	font-weight: bold;
	cursor: pointer;
}

a:hover {
	color: var(--linkHover);
	filter: opacity(.7);
}

p {
	margin: 0 0 2em 0;
	line-height: 1.5em;
}

.template {
	display: none !important;
}

.ghost {
	opacity: .5;
	border:2px dashed #c0c0c0;
	padding: 5px;
}

.offline {
	opacity: .3;
}

input.good { border-color: #4CAF50 !important; }
input.bad { border-color: #d10918 !important; }
input.new { border-color: #4a9dbc !important; }

span.help {
	display: inline-block;
	position: relative;
	width: 1em;
	height: 1em;
	background-image: url('/images/interface/help-blue.svg');
	background-position: center;
	background-repeat: no-repeat;
	background-size: 1em;
	cursor: help;
}

span.help div.help-item {
	position: absolute;
	top: 0.5em;
	left: 0.5em;
	z-index: 999;
	width: 15.5em;
	min-height: 1em;
	background-color: var(--color1);
	border: 1px solid black;
	border-radius: 5px;
	padding: 0.5em;
}

input.error, textarea.error {
	border-color: var(--deleteHover) !important;
	box-shadow: 0px 0px 5px var(--deleteHover) !important;
}
input[type='checkbox'].error{
	outline: 1px solid var(--deleteHover) !important;
}

label.error {
	position: absolute;
	z-index: 1;
	bottom: -0.5em;
	font-size: 0.75em;
	color: var(--deleteHover);
	left: 1em;
	pointer-events: none;
	width: 5em !important;
}

label span.notice_required {
	font-size: 0.75em;
	color: var(--deleteHover);
	position: relative;
	top: -0.3em;
}

input[type='button']:hover, input[type='submit']:hover {
	filter: opacity(.7);
	cursor: pointer;
}

div.helperBlock {
	display: flex;
	justify-content: center;
	font-style: italic;
	font-size: 1.2em;
	padding: 2em;
	margin: 2em auto 2em auto;
	width: calc(100% - 4em);
}

div.helperBlock img {
	width: 1em;
	height: 1em;
}

div.helperBlock p.message {
	margin: 0 0 0 1em;
	line-height: 1em;
}

span.notice {
	display: inline-block;
	min-width: 100px;
	max-width: 400px;
	padding: 5px 10px;
	border-top: 1px solid #000;
	border-left: 3px solid var(--color4);
	border-right: 1px solid #000;
	border-bottom: 1px solid #000;
	background-color: var(--color2);
	text-align: left;
	color: #fff;
	position: fixed;
	right: 10%;
	top: 15px;
	border-radius: 5px;
	z-index: 999;
}

span.tag {
	border-radius: 0.8em;
	padding: 0.4em;
	color: #000;

}

/* Basic Layout Style */

div#layoutWrapper {
	display: grid;
	width: 100%;
	height: 100vh;
}

@media (max-width: 61.9rem) {
	div#layoutWrapper {
		grid-template-rows: 4rem auto auto;
		grid-template-columns: 100%;
		grid-template-areas: "header" "content" "footer";
	}
	
	section#navMenu { 
		display: block;
		position: fixed;
		top: 4rem;
		height: calc(100% - 4rem);
		width: 100vw;
		left: -100vw;
		overflow-x: scroll;
	}
	
	header#mainHeader {
		display: flex;
	}
	
	header#mainHeader div.header-logo {
		display: inline-block;
		flex: 0 0 calc(100% - 3em);
		height: 100%;
	}
	
	header#mainHeader div.header-button {
		flex: 0 0 2.5em;
		padding-right: 0.5em;
		align-self: center;
	}
	
	div.header-button input.mobile-menu {
		width: 1.5em;
		height: 1em;
		display: block;
		border: none;
		background-color: transparent;
		font-family: "Font Awesome\ 5 Free";
		font-weight: 900;
		color: var(--menu-button);
		cursor: pointer;
		font-size: 2em;
		outline: none;
	}
	
	
	
}

@media (min-width: 62rem) {
	div#layoutWrapper {
		grid-template-rows: 4rem auto auto;
		grid-template-columns: 12rem auto;
		grid-template-areas: "header header" "menu content" "footer footer";
	}
	
	header#mainHeader div.header-logo {
		display: block;
		height: 100%;
	}
	
	div.header-button { display: none; }
	
}

body#body_logout div#layoutWrapper {
	grid-template-columns: 100%;
	grid-template-areas: "header" "content" "footer";
}

header#mainHeader {
	display: block;
	grid-area: header;
	background-color: var(--header-background);
	padding: 0.5em;
}

	header#mainHeader div.header-logo img {
		width: 8em;
		display: block;
		max-height: 100%;
	}

section#navMenu {
	display: table-cell;
	grid-area: menu;
}

section#mainWrapper {
	display: table-cell;
	grid-area: content;
}

footer#mainFooter {
	display: block;
	grid-area: footer;
}

/* Menu modifications */

nav ul#topMenu {
	display: block;
	width: calc(100% - 2em);
	margin: 1em;
}

nav ul#topMenu > li {
	display: block;
	width: 100%;
	padding: 0.5em 0.3em;
}

nav ul#topMenu > li.selected {
	/*background-color: var(--menu-block-selected);*/
}

/*nav ul#topMenu > li:hover { border-left-color: var(--menu-link-hover); }*/

nav ul#topMenu li a {
	display: block;
	color: var(--menu-link);
	width: 100%;
	height: 100%;
	font-weight: 500;
}

nav ul#topMenu li.selected a {
	font-weight: 800;
}

nav ul#topMenu ul.submenu {
	display: block;
	width: calc(100% - 1em);
	margin-left: 1em;
	list-style: none;
}

nav ul#topMenu ul.submenu li {
	border-left: 0.2em solid transparent;
	padding: 0.3em 0.3em;
	transition: all 0.2s;
}

nav ul#topMenu ul.submenu li.selected {
	border-left-color: var(--menu-border-selected);
}

nav ul#topMenu ul.submenu li:hover { 
	border-left-color: var(--menu-border-hover);
	background-color: var(--menu-background-hover);
	transition: all 0.2s;
}

section.mainBlock {
	display: grid;
	grid-gap: 1.5em;
}

@media (max-width: 61.9em) {
	
	section#mainWrapper {
		padding: 1em 0.5em;
	}
	
	section.mainBlock {
		grid-template-columns: 1fr;
	}
	
}


@media screen and (min-width: 62em) {
	
	section#mainWrapper {
		width: 100%;
		position: relative;
		padding: 2em 0;
	}
	
	section.mainBlock {
		width: calc(100% - 4em);
		margin: 0 auto;
		min-height: 11.5em;
		grid-template-columns: 1fr 1fr 1fr 1fr;
	}


}

/* Main Block */

section.mainBlock:not(.nofill) {
	/*background-color: var(--block-background);*/
}

section.mainBlock.nogrid {
	display: block; !important;
}

section.mainBlock.mini {
	max-width: 30em;
}

section.mainBlock.medium {
	max-width: 50em;
}

@media (max-width: 59.9rem) {
	section.mainBlock > section {
		padding: 1em 0.5em;
		width: calc(100% - 1em);
	}
}

@media (min-width: 60rem) {
	section.mainBlock > section {
		padding: 1em 1em;
		width: calc(100% - 2em);
	}
}

section.mainBlock > section.nopad {
	padding: 0;
}



/* Pages */
header.pageHeader {
	display: grid;
	width: 100%;
	min-height: 3.75em;
	/* grid-template-columns: auto auto max-content; */
	grid-template-areas: "title actions" "scroll scroll";
	grid-gap: 1em;
	align-items: center;
}

header.pageHeader h2 {
	grid-area: title;
	margin: 0 !important;
}

section.mainBlock div.linkBlock {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
}

section.mainBlock div.linkBlock div {
	width: 10em;
	height: 9.25em;
	border: 1px solid #000;
}

section.mainBlock div.linkBlock div ~ div {
	margin-left: 1em;
}

section.mainBlock div.linkBlock div a {
	width: 100%;
	height: 100%;
	display: block;
}


/* Details - Normal Page Output */

section.detail {
	grid-column: span 4;
	min-height: 15em;
	position: relative;
	background-color: var(--block-background);
	border-radius: 3px;
	padding: 1em;
}

section.detail * ~ header {
	margin-top: 2.5em;
}

section.detail aside {
	width: 12.5em;
	border-right: 2px solid var(--color1);
	vertical-align: top;
	
}

section.detail aside ~ div {
	padding-left: 2.5em;
}

section header > menu.actions {
	display: flex;
	grid-area: actions;
	justify-self: end;
}

section menu.actions > a, section menu.actions > a:visited {
	background-color: var(--button);
	border-radius: 10px;
	padding: 0.5em .75em;
	color: #ffffff;
	display: inline-block;
	margin: 0.5em;
}

section menu.actions > a[class^='icon'] {
	padding-left: 0.5em;
}

@media (max-width: 59.9rem) {
	
	section menu.actions a {
		width: 1em;
		height: 1em;
		padding: 0.5em !important;
		color: transparent !important;
		overflow: hidden;
	}
	
}

section.detail div.calendarScroll {
	display: flex;
	grid-area: scroll;
	justify-self: end;
	height: 2em;
}

/* Tables */

table.list {
	width: 100%;
	border-collapse: collapse;
	table-layout: fixed;
	font-size: 0.8em;
}

table.list.small {
	font-size: 8pt;
}

table.list tbody {
	width: 100%;
}

table.list th {
	border-bottom: 0.2em solid var(--color1);
}

table.tablesorter th:hover {
	cursor: pointer;
	text-decoration: underline;
}

table.tablesorter th.tablesorter-headerAsc {
	background-image: url('/images/interface/up-arrow-black.svg');
	background-repeat: no-repeat;
	background-size: 1em;
	background-position: calc(100% - 1em) 50%;
	background-color: var(--color1);
	color: #FFF;
}

table.tablesorter th.tablesorter-headerDesc {
	background-image: url('/images/interface/down-arrow-black.svg');
	background-repeat: no-repeat;
	background-size: 1em;
	background-position: calc(100% - 1em) 50%;
	background-color: var(--color1);
	color: #FFF;
}

table.list td, table.list th {
	padding: 0.4em 0.8em;
	/*word-wrap: break-word;*/
}

table.accounting tr:not(.total):not(.subtotal) td:not(.vertical):hover {
	background: linear-gradient(rgba(0,0,0, 0.1),rgba(0,0,0, 0.1));
}

table.accounting td {
	padding: 1em;
}

table.list tr {
	transition: background-color 0.2s, color 0.2s;
}

table.list tbody tr:not(.subtotal):not(.total):hover {
	background-color: var(--blue-tricady);
	color: #FFF !important;
	transition: background-color 0.2s, color 0.2s;
}

table.list tbody tr:hover a {
	color: #FFF !important;
	transition: color 0.2s;
}

table.list tr.clickable:hover {
	cursor: pointer;
}

table.list td.cost, table.list td.number, table.list td.right, table.list td:last-of-type {
	text-align: right;
}

table.list td.cost {
	padding-left: 0.5em;
}

table.list td.cost::before {
	content: '$ ';
	opacity: .3;
}

table.list td.center {
	text-align: center;
}

table.list tr.subtotal {
	border-top: 1px solid black;
	font-weight: bold;
}

table.list tr.total {
	border-top: 2px solid black;
	border-right: 2px solid black;
	font-weight: bold;
}

table td.vertical {
	background-color: var(--blue-secondary);
	color: #FFF;
}

table td.vertical span {
	display: inline-block;
	transform: rotate(270deg);	
}

@media screen and (min-width: 62em) {
	td.optcol, th.optcol {
		display: default;
	}
}

@media screen and (max-width: 61.9em) {
	td.optcol, th.optcol {
		display: none;
	}
}

@media screen and (min-width: 32em) {
	td.optcol2, th.optcol2 {
		display: default;
	}
}

@media screen and (max-width: 31.9em) {
	td.optcol2, th.optcol2 {
		display: none;
	}
}


/* Actions on tables */
div.actions {
	position: relative;
	display: inline-block;
	width: 3.75em;
	height: 1.5em;
}

div.actions span {
	width: 100%;
	height: 100%;
	display: block;
	font-size: 1.5em;
}

div.actions:hover {
	color: #FFF;
}

div.actions ul {
	display: none;
	position: absolute;
	z-index: 5;
	list-style: none;
	padding: 1em;
	background-color: var(--blue-tricady);
	border: 1px solid var(--blue-secondary);
	min-width: 12em;
	text-align: left;
	top: 1.5em;
	right: 0;
}

div.actions ul li ~ li {
	margin-top: 5px;
}

div.actions ul li a {
	display: block;
	width: calc(100% - 15px);
	padding: 0.5em 0.5em 0.5em 1em;
}

div.actions ul li a:hover {
	background-color: var(--highlight);
	border-radius: 10px;
}

/* Content Splits */

div.contentSplit {
	display: grid;
	grid-gap: 1em;
}

@media (max-width:39.9em) {
	div.contentSplit {
		grid-template-columns: 1fr;
	}
}


@media (min-width:40em) {
	div.contentSplit {
		grid-template-columns: 75% auto;
	}
}

/* Invoices and Quotes */
@media (max-width: 61.9rem) {
	
	section#viewBlock.company-jobs span.fieldGroup div.autoComplete {
		flex: 0 1 70% !important;
		order: 2;
	}
	
	section#viewBlock.company-jobs span.fieldGroup menu {
		order: 2;
	}
	
	section#viewBlock.company-jobs span.fieldGroup div:not(.autoComplete) {
		order: 3;
	}
	
	section#viewBlock.company-jobs input.move {
		display: none !important;
	}
}

/* Overscan */

div#overscan {
	width: 100%;
	height: 100%;
	display: none;
	background-color: rgba(0, 0, 0, 0.6);
	z-index: 20;
	position: fixed;
	top: 0;
	left: 0;
}

section#viewBlock {
	display: block;
	background-color: #FFFFFF;
	border-radius: 10px;
	margin: 3em auto;
	z-index: 50;
	padding: 1em;
	position: relative;
}

div#viewTopAction {
	display: block;
	position: absolute;
	right: -1em;
	top: -1em;
	z-index: 175;
}

div#viewTopAction input {
	height: 2em;
	width: 2em;
	border: 2px solid #FFFFFF;
	color: #FFFFFF;
	background-color: #000000;
	border-radius: 50%;
}

div#viewTopAction input:hover {
	filter: none;
	background-color: #c0c0c0;
}

div#viewTopAction #viewCloseMobile {
	display: none;
}

@media (max-width: 59.9rem) {
	
	section#viewBlock {
		margin: 0 !important;
		height: calc(100% - 2em) !important;
		width: calc(100% - 2em) !important;
		border-radius: 0;
	}
	
	div#viewTopAction {
		top: 0.5em;
		right: initial;
		left: 0.5em;
		width: 3em;
		height: 3em;
	}
	
	div#viewTopAction #viewCloseMobile {
		display: block;
		color: #000;
		cursor: pointer;
		transition: all 0.2s;
		text-align: center;
		padding: 1em;
		font-size: 1.2em;
	}
	
	div#viewTopAction #viewCloseMobile:hover {
		color: #18333c;
	}
	
	
	div#viewTopAction input#viewClose {
		display: none;
	}
	
	div#overscan header.boxHeader {
		text-align: right;
	}
	
}

@media (min-width: 60rem) {
	section#viewBlock {
		max-height: 80%;
	}
}

section#viewBlock #viewContent {
	height: calc(100% - 8.2em);
	min-height: 5em;
	overflow-y: auto;
	overflow-x: hidden;
	margin-top: 4em;
	padding-top: 1em;
}

section#viewBlock header.boxHeader {
	display: block;
	width: calc(100% - 1em);
	color: #FFF;
	height: 1.2em;
	font-size: 1.5em;
	position: absolute;
	top: 0;
	left: 0;
	background-color: var(--blue-secondary);
	border-top-left-radius: 10px;
	border-top-right-radius: 10px;
	padding: 0.5em;
}

div#viewBottomAction {
	width: 100%;
	height: 2.2em;
	padding: 1em 0 ;
	display: flex;
	justify-content: center;
}

div#viewBottomAction input {
	height: 2em;
	border-radius: 5px;
	border: 0;
	padding: 0 1.2em;
	background-color: #18333c;
	color: #FFFFFF;
	transition: all 0.2s
}

div#viewBottomAction input ~ input {
	margin-left: 1em;
}

div#viewBottomAction input:not(:last-of-type) {
	background-color: #eeecee;
	color: #000;
}


div#viewBottomAction input#viewSave {
	background-color: var(--color4);
	color: #ffffff;
}

div#viewBottomAction input#viewemove {
	background-color: var(--color3);
	color: #000000;
}

div#viewBottomAction input#viewemove:hover {
	background-color: var(--deleteHover) !important;
}

/* Footer Style */
footer#mainFooter {
	display: block;
	margin: 2em 0;
	text-align: center;
	font-size: 0.8em;
	color: #c0c0c0;
	padding-bottom: 5em;
}
