/*
	Minimal app template
	By CC Chamberlin
	2/10/2023
*/

/*
	============================================   DOCUMENT-STRUCTURE
*/
:root {
    /*palette*/
    --black: #102b36;
    --gray-dark: #3e555f;
    --gray: #c3cfe7;
    --gray-light: #e7eaf7;
    --blue-dark: #151660;
    --blue-gray: #355090;
    --blue: #3442b0;
    --blue-light: #588efa;
    --yellow: #ecb922;
    --yellow-light: #f2da78;
    --red-dark: #570102;
    --red: #df4727;
    --red-light: #f0785c;
    --brown: #8e4228;
    --tan: #eba95c;
    --tan-light: #f4f0d7;
    --green-dark: #124a1d; /*#2e9156;*/
    --green-light: #bfde75;
    --green: #6daf4b;
    --teal-light: #8fffff;
    --teal: #4bb0b7;
    --teal-dark: #0b4f47;
    /*fonts*/
    --header-font: "Winky Sans", sans-serif;
    --body-font: "Nunito", sans-serif;
    /*spacing*/
    --gutter-x: 1rem;
    --gutter-y: 1rem;
}
* {
	box-sizing: border-box;
}

a[href] {
	color: var(--blue);
}

html {
	background-color: var(--blue);
}

body {
	padding: 0px;
	margin: 0px;
	font-family: var(--body-font);
	font-size: 12pt;
	background-color: white;
	line-height: 1.5;
	grid-template-columns: 1fr;
}

/*
	============================================   DOCUMENT-HEADER
*/

header {
	background-color: #2442a0;
	color: white;
	display: flex;
	justify-content: space-between;
	align-items: center;
	font-size: 24pt;
	font-weight: bold;
	padding: 20px;
	height: 100px;
}
header > img {
	max-height: 48px;
	max-width: 49px;
}

#affiliation {
	background-image: url( https://aces-shared-assets.nmsu.edu/nm_state_logo_aces.svg );
	background-repeat: no-repeat;
	background-size: 80px 80px;
	background-position: 10px 50%;
	padding-left: 100px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	min-height: 100px;
}

header #university-name {
}
header #college-name {
}
header #department-name {
	font-weight: bold;
	font-size: 18pt;
}

#context-escape {
	display: grid;
	align-items: center;
	justify-items: center;
	border: 1px solid white;
	margin: 20px;
	border-radius: 10px;
	min-width: 60px;
	height: 60px;
	padding: 10px 10px;
	text-align: center;
	cursor: pointer;
}
#context-escape:hover {
	background-color: rbga(255,255,255,0.25);
}

/*
	============================================   DOCUMENT-BODY
*/

main {
	background-color: white;
	display: grid;
	grid-template-columns: 1fr 4fr;
	grid-column-gap: 20px;
	padding: 20px;
	padding-top: 10px;
	min-height: calc( 100vh - 100px - 100px );
}

nav.sidebar {
	grid-area: 1 / 2 / 2 / 3;
	grid-area: 1 / 1 / 2 / 2;
	background-color: #eee;
	border: 3px solid #ddd;
	border-radius: 10px;
	padding: 20px;
}
.nav-section {
	font-weight: bold;
}

nav.breadcrumbs {
	background-color: white;
	padding: 5px;
	font-size: 10pt;
}
nav.breadcrumbs ul {
	margin: 5px 0px;
}
nav.breadcrumbs li {
	display: inline;
}
nav.breadcrumbs li:before {
	content: "> ";
}

/*
	============================================   UTILITY-CLASSES
*/

.error, .warning, .notice {

	padding: 20px;
	padding-left: 65px;
	background-image: url( https://aces-shared-assets.nmsu.edu/_files/css/warning-light.svg );
	background-repeat: no-repeat;
	background-size: 30px 30px;
	background-position: 20px 50%;

	display: block;
	border: 1px solid black;
	margin: 10px 0px;
	border-radius: 10px;
	
}

.error {
	background-image: url( https://aces-shared-assets.nmsu.edu/_files/css/bomb-light.svg );
	background-color: #fcc;
	color: #633;
	border: 1px solid #966;
}

.notice {
	background-image: url( https://aces-shared-assets.nmsu.edu/_files/css/check-circle-light.svg );
	background-color: #def;
	color: #369;
	border: 1px solid #69c;
}

.warning {
	background-color: #ff9;
	color: #660;
	border: 1px solid #990;
}

/*
	============================================   DOCUMENT-FOOTER
*/

table.zebra-table {
	border: 1px solid #2442a0;
	border-collapse: collapse;
}
table.zebra-table tbody {
	border: 1px solid #2442a0;
}

table.zebra-table thead th {
	background-color: #2442a0;
	color: white;
	font-weight: bold;
}
table.zebra-table thead th:not( :first-child ) {
	border-left: 1px dotted white;
}
table.zebra-table th, table.zebra-table td {
	padding: 8px;
}
table.zebra-table tbody td:not( :first-child ) {
	border-left: 1px dotted #2442a0;
}
table.zebra-table tbody > :nth-child( 2n+1 ) {
	background-color: #f0cddc;
	background-color: #fcd7e7;
	background-color: #d8dfff;
	zborder-bottom: 1px solid #2442a0;
}
table.zebra-table tfoot tr {
	background-color: #e5e5e5;
	color: black;
	border-top: 1px solid #2442a0;
}

/*  Print-based zebra tables are grayscale and more compact */
@media print {

	table.zebra-table {
		border: 1px solid #888;
	}
	table.zebra-table tbody {
		border: 1px solid #888;
	}

	table.zebra-table thead th {
		background-color: #666;
		font-weight: bold;
		color: white;
	}

	table.zebra-table th, table.zebra-table td {
		padding: 2px;
		font-size: 10pt;
	}
	table.zebra-table tbody td:not( :first-child ) {
		border-left: 1px dotted #888;
	}
	table.zebra-table tbody > :nth-child( 2n+1 ) {
		background-color: #eee;
		border-top: 1px solid #888;
		border-bottom: 1px solid #888;
	}
	table.zebra-table tfoot tr {
		background-color: #eee;
		color: black;
		border-top: 1px solid #888;
	}
	.staff-action {
		display: none;
	}

}


/*
	============================================   FORM-STYLES
*/

.nb {
	display: grid;
	align-items: center;
	padding: 10px;
	padding-left: 50px;
	background-image: url( https://aces-shared-assets.nmsu.edu/_files/css/clipboard-check-light.svg );
	background-repeat: no-repeat;
	background-size: 30px 30px;
	background-position: 10px 50%;
	min-height: 30px;
	background-color: #efe;
	border: 1px solid #9a9;

	margin: 0px 0px;
	border-radius: 10px;
	font-style: italic;
	color: #070;
	
}
.nb:empty {
	display: none;
}
.nb p {
	margin: 10px 0px;
}

fieldset {
	border: 1px dashed #2442a0;
	margin-bottom: 20px;
	border-radius: 10px;
	padding: 20px;
}

legend {
	color: #2442a0;
	font-size: 10pt;
}

button, input[type="submit"] {
	border: 1px solid #2442a0;
	display: inline-block;
	font-size: 12pt;
	color: #2442a0;
	background-color: white;
	border-radius: 3px;
	transform: translate( 0px, -3px );
	box-shadow: 0px 3px #2442a0;
	padding: 6px;
}

button:active, input[type="submit"]:active {
	transform: translate( 0px, 0px );
	box-shadow: none;
}

button.call-to-action, input[type="submit"].call-to-action {
	background-color: #2442a0;
	color: white;
	border: 1px solid black;
	box-shadow: 0px 3px black;
	width: 100%;
	padding: 10px;
}
button.call-to-action:active, input[type="submit"].call-to-action:active {
	box-shadow: none;
}

button.inline, input[type="submit"].inline {
	padding: 1px 4px;
	font-size: 12pt;
	margin: 0px 2px;
	transform: translate( 0px, -1px );
	box-shadow: 0px 1px #2442a0;
}
button.inline:active, input[type="submit"].inline:active {
	transform: translate( 0px, 0px );
	box-shadow: none;
}

label {
	display: block;
	text-transform: uppercase;
	font-variant: small-caps;
	letter-spacing: 2px;
	color: #444;
	margin: 5px 0px;
}

input[type="text"], input[type="email"], input[type="password"], textarea {
	font-size: 12pt;
	border: 1px solid #2442a0;
	padding: 6px;
	border-radius: 3px;
}

input[type="checkbox"] {
	accent-color: #9d3039;
	outline: 1px solid #9d3039;
}

select {
	font-size: 12pt;
}

textarea {
	padding: 10px;
	font-size: 12pt;
	width: 100%;
}

input.full-width, button.full-width {
	width: 100%;
}


/*
	============================================   DOCUMENT-FOOTER
*/

footer a[href] {
	color: #fcc;
}

footer#app-footer {
	width: 100%;
	padding: 10px;
	background-color: #555;
	color: white;
	display: flex;
	justify-content: space-between;
	align-items: flex-start;
	align-content: flex-start;
	flex-wrap: wrap;
	column-gap: 10px;
}

footer h1 {
	font-size: 16pt;
}

footer#legal {
	display: grid;
	align-items: center;
	width: 100%;
	padding: 10px;
	min-height: 100px;
	background-color: #2442a0;
	color: white;
	text-align: right;
}

/*
	============================================   MODAL-PAGE
*/

.modal {
	background-color: #2442a0;
	display: grid;
	align-items: center;
	justify-items: center;
	height: 100vh;
	width: 100vw;
	overflow: hidden auto;
}

.modal main {
	background-color: white;
	display: block;
	padding: 20px;
	border-radius: 20px;
	min-height: auto;
	box-shadow: 0px 20px 10px rgba( 0, 0, 0, 0.5);
	max-width: min(80%, 40em );
	margin-top: 1em;
	margin-bottom: 1em;
}
.modal:after {
	opacity: 0%;
	width: 2em;
	height: 4em;
	content: " ";
}

.modal footer#legal {
	position: fixed;
	bottom: 0px;
	z-index: -1;
}

/*	Fixes an error in the password change form in the modal box
	because the password forms are of fixed width
.modal input[type="password"] {
	width: 100%;
}


/*
	============================================   USER-TABLE
*/

.user-table form, .user-table .heading {
	display: grid;
	grid-template-columns: 1fr 10fr 10fr 5fr;
	padding: 10px;
}
.user-table form:nth-child( 2n ) {
	background-color: #eee;
}
.user-table .heading {
	background-color: #999;
	color: white;
	font-weight: bold;
}
.user-table .addition {
	background-color: #cfc;
	color: black;
}



/*
	============================================   MOBILE-ADJUSTMENTS
*/


/* Mobile Devices */
@media screen and (max-width: 480px) {
	main {
		/*background-color: #efe !important;*/
		display: block;
		grid-template-columns: 1fr;
		grid-column-gap: 20px;
		padding: 20px;
		min-height: calc( 100vh - 100px - 2em );
	}
	#affiliation {
		display: block;
	}
	header {
		display: grid;
		grid-template-columns: 1fr;
	}
	#context-escape {
		padding: 5px 5px;
		height: 30px;
	}
	
	main {
		padding: 0px;
	}
	
	nav.sidebar {
		background-color: #333;
		color: white;
		border: none;
		border-radius: 0px;
	}
	nav.sidebar a[href] {
		color: #f38cb8;
	}
	
	nav.sidebar ul, nav.sidebar p {
		margin-block-start: 0.1em;
		margin-block-end: 0.1em;
		padding-inline-start: 0em;
	}
	nav.sidebar ul, nav.sidebar li {
		display: inline;
		white-space: nowrap;
		margin: 3px;
		margin-left: 0px;
		margin-right: 10px;
	}
	
	nav.breadcrumbs {
		padding: 10px 20px;
	}
	nav.breadcrumbs a[href] {
	}
	
	nav.breadcrumbs ul, nav.breadcrumbs p {
		margin-block-start: 0.1em;
		margin-block-end: 0.1em;
		padding-inline-start: 0em;
	}
	nav.breadcrumbs ul, nav.breadcrumbs li {
		display: inline;
		margin: 3px;
		margin-left: 0px;
		margin-right: 10px;
	}
	
	section {
		padding: 10px;
	}

	.error, .warning, .notice, .nb {

		padding: 5px 10px;
		background-image: none;
		background-repeat: no-repeat;
		background-size: 30px 30px;
		background-position: 20px 50%;
		display: block;
		border: 1px solid black;
		margin: 10px 0px;
		border-radius: 5px;
	}

}

/* override styles when printing */
@media print {

	.breadcrumbs { display: none; }
	.sidebar { display: none; }
	main {
		display: block;
	}
	header {
		background-color: transparent;
		color: black;
	}
	header img {
		display: none;
	}
	#affiliation {
		background-image: none;
		padding-left: 0px;
		border-bottom: 1px dashed #999;
		width: 100%;
	}
	footer#legal {
		background-color: transparent;
		color: gray;
		border-top: 1px dashed #999;
	}

}

