/*Content - Generic*/
* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: Helvetica, sans-serif;
}

:root {
	--primary-dark: oklch(0.3 0.15 180);
	--primary-light: oklch(0.5 0.15 180);
}
html, body {
	overflow: hidden;
}

body {
	position: relative;
	background: var(--primary-dark);
	display: grid;
	place-items: center;
	height: 100vh;
	color: white;
	overscroll-behavior: none;
	-webkit-user-select: none;
	user-select: none;
	font-size: 100%;
}

main {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 100%;
	overflow: hidden;
	background: linear-gradient(0deg, var(--primary-dark) 0%, var(--primary-light) 100%);
	transition: transform .2s;
}

h1, h2 {
	text-align: center;
}

h1 {
	padding-top: 2rem;
	padding-bottom: 1rem;
}

h2 {
	position: relative;
	color: rgba(255, 255, 255, 0.75);
	line-height: 1.5rem;
	font-size: 1.25rem;
	font-weight: normal;
	padding-top: 1rem;
	padding-bottom: 0.5rem;
}

h3 {
	position: relative;
	color: rgba(255, 255, 255, 0.5);
	line-height: 1rem;
	font-size: 1.25rem;
	font-weight: normal;
	padding-top: 0.5rem;
	padding-bottom: 0.5rem;
	text-align: center;
}

div {
	font-size: 1rem;
}

a {
	color: rgba(255, 255, 255, 0.75);
}

li {
	margin: 1rem;
	font-size: 1.25rem;
}

.container {
	overflow-x: hidden;
	width: 100%;
}

.section {
	display: flex;
}

.slice {
	background: transparent;
	flex: 1 0 100%;
	padding: 5%;
	height: 100vh;
	overflow-y: scroll;
	overflow-x: hidden; /* Hide bottom scrollbar. It creates white artifacts in corners*/
	padding-bottom: 25vh;
}

/* Scrollbar styling */
::-webkit-scrollbar {
	width: 0.5em;
	background: rgba(0, 0, 0, 0.125);
}

::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.5);
}

.top-round {
	border-radius: 0.5rem 0.5rem 0 0;
}

.round {
	border-radius: 0.5rem;
}

/* The side navigation menu */
.sidenav {
	position: fixed;
	width: 0;
	left: 0;
	top: 0;
	z-index: 3;
	background: var(--primary-dark);
	overflow: hidden;
	transition: width .2s;
	height: 100vh;
	padding-top: 2vh;
}

.sidenav-overlay {
	opacity: 0;
	width: 100%;
	height: 100%;
	z-index: 2;
	background-color: rgba(0, 0, 0, 0.5);
	transition: opacity 0.2 ease;
}

.show-sidenav-overlay {
	opacity: 1;
	transition: opacity 0.2s ease;
}

.view-link {
	padding: 1rem;
	font-size: 1.1rem;
	color: gainsboro;
	display: block;
	text-decoration: none;
}

.view-link:hover {
	background: rgba(0, 0, 0, 0.2);
}

/* The bottom navigation menu */
nav {
	position: fixed;
	bottom: 0;
	height: auto;
	width: 100%;
	display: block;
	justify-content: space-evenly;
	z-index: 1;	
	/* Put blur at lowest level because backdrop filter doesn't work when there is another
	element above it in the dom hierarchy which also has the blur effect as a backdrop-filter. */
	background: rgba(128, 128, 128, 0.3);
	-webkit-backdrop-filter: blur(5px);
	backdrop-filter: blur(5px);
}

.nav-header, .nav-footer {
	height: 10vh;
	display: flex;
	justify-content: space-evenly;
}

.nav-footer {
	border-top: 1px solid gainsboro;
}

.nav-header:after {
	content: '';
	width: 100%;
	height: 2px;
	background: white;
	position: absolute;
}

.nav-item:hover {
	background: rgba(0, 0, 0, 0.4);
}

.nav-item {
	width: 100%;
	height: 100%;
	border: none;
	background: transparent;
	font: inherit;
	color: white;
	position: relative;
}

button {
	width: 1.5rem;
	height: 1.5rem;
	background: transparent;
	border: none;
	margin: 0 auto;
	display: block;
}

.large-text {
	font-size: 1.5rem;
}

.white-50 {
	color: rgba(255, 255, 255, 0.5);
}

img {
	filter: invert(1);
	height: 1.75rem;
}

/* Table styling */
table {
	border-collapse: collapse;
	table-layout: fixed;
	width: 100%;
	margin: 2vh 0;
	overflow: hidden;
	border-radius: 0.5rem;
}

thead tr {
	font-weight: bold;
	text-align: left;
	background: rgba(200, 200, 200, 0.4);
	backdrop-filter: blur(5px);
}

table th, table td {
	padding: 0.5rem 0.25rem;
	margin-left: 0.75rem;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 6rem;
	font: inherit;
}

th:first-child, td:first-child {
	padding-left: 0.75rem;
}

.wide-col {
	width: 30vw;
}

.narrow-col {
	width: 11vw;
}

.normal-col {
	width: 21vw;
}

tbody>tr {
	transition: background-color .25s ease;
	border-bottom: 1px solid gainsboro;
	z-index: 8;
}

tbody>tr:nth-child(odd) {
	background: rgba(0, 0, 0, 0.1);
}

tbody>tr:nth-child(even) {
	background: rgba(0, 0, 0, 0.2);
}

tbody>tr:hover, .active {
	background: rgba(0, 0, 0, 0.4);
}

tfoot {
	border-bottom: none;
	font-weight: bold;
	background: rgba(255, 255, 255, 0.15);
}

/* The Modal (backdrop) */
.modal {
	visibility: hidden;
	opacity: 0;
	position: fixed;
	left: 0;
	top: 0;
	width: 100vw;
	height: 100vh;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.3);
	transition: opacity 2s;
	z-index: 4;
}

/* Modal Content */
.modal-content {
	position: fixed;
	flex: 1 0 100%;
	display: flex;
	flex-direction: column;
	width: 100%;
	height: 70%;
	bottom: -70%;
	background: rgba(0, 0, 0, 0.05);
	-webkit-backdrop-filter: blur(5px);
	backdrop-filter: blur(5px);
	border-radius: 1rem 1rem 0 0;
	border-top: 1px solid gainsboro;
	transition: transform 0.2s ease;
	z-index: 5;
}

.modal-header {
	height: 5vh;
	margin-top: 5vh;
	margin-bottom: 5vh;
}

.modal-body {
	height: 85vh;
	margin: 0 5vw 10vh;
	overflow-y: scroll;
	position: relative;
}

.modal-footer {
	position: absolute;
	height: 5%;
	margin: 2.5% 5%;
	display: flex;
	justify-content: space-between;
	bottom: 0;
	left: 0;
	right: 0;
}

.no-scrollbar::-webkit-scrollbar {
	display: none;
}

h3:hover {
	text-decoration: underline;
}

.show-modal-backdrop {
	visibility: visible;
	opacity: 1;
	transition: opacity 0.2s ease;
}

.show-modal-content {
	transition: transform 0.2s ease;
	transform: translateY(-100%);
}

/*InputField. Taken from: https://www.codingnepalweb.com/create-glassmorphism-login-form-html-css/?fbclid=IwAR1RwE7thkqWvDRFphNTGGhOyrDGSzOknf5W1XT65gkeHicr-oK0hzsOv0I*/
.input-field {
	position: relative;
	border-bottom: 2px solid #ccc;
	margin: 15px 0;
	color-scheme: dark;
}

.input-field label {
	position: absolute;
	top: 50%;
	left: 0;
	transform: translateY(-50%);
	color: #fff;
	pointer-events: none;
	transition: 0.15s ease;
	font: inherit;
}

.input-field input {
	width: 100%;
	height: 40px;
	background: transparent;
	border: none;
	outline: none;
	color: #fff;
	font: inherit;
}

.input-field input:focus~label,
.input-field input:valid~label {
	font-size: 0.8rem;
	top: 10px;
	transform: translateY(-120%);
	color: gainsboro;
}

/*Accordion*/
.accordion {
	position: absolute;
	transform: translate(-50%, 0%);
	left: 50%;
}

.accordion-state {
	display: none;
	appearance: none;
}

.accordion-item {
	margin-bottom: 0.5rem;
	color: white;
	border-radius: 0.5em;
	background: rgba(255, 255, 255, 0.1);
	-webkit-backdrop-filter: blur(5px);
	backdrop-filter: blur(5px);
	justify-content: center;
}

.accordion-content {
	color: white;
}

.accordion-header {
	color: white;
	cursor: pointer;
	padding: 0.75rem;
	width: 100%;
	display: block;
}

.accordion-state~.accordion-content {
	max-height: 0;
	overflow: hidden;
	transition: 0.25s linear;
}

.accordion-state:checked~.accordion-content {
	max-height: 100vh;
	transition: max-height 0.2s linear;
}

.accordion-secondary {
	padding: 0.5rem;
	margin: 0.5rem 1.5rem;
	border-bottom: 1px solid white;
	cursor: pointer;
	display: flex;
	justify-content: space-between;
}

label {
	background: transparent;
	transition: 0.2s;
}

.setting {
	position: relative;
	cursor: pointer;
	float: right;
}

.setting-outline {
	width: 3rem;
	height: 1.5rem;
	display: block;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-radius: 1rem;
	background: rgba(255, 255, 255, 0.1);
	transition: 0.2s;
}

.setting-indicator {
	width: 1.5rem;
	height: 1.5rem;
	position: absolute;
	top: 0;
	left: 0;
	display: block;
	border: 2px solid;
	border-radius: 1rem;
	background: white;
	transition: 0.2s;
}

.setting-state:checked ~ .setting-indicator {
	left: 1.5rem;
}

.setting-state:checked ~ .setting-outline {
	background-color: rgba(255, 255, 255, 0.5);
}

.alert {
	position: absolute;
	top: -12%;
	left: 10%;
	display: flex;
	justify-content: space-between;
	align-items: center;
    padding: 1rem 2rem;
	border-radius: 0.5em;
	border-top: 1px solid gainsboro;
	background: rgba(0, 0, 0, 0.2);
	-webkit-backdrop-filter: blur(5px);
	backdrop-filter: blur(5px);
	width: 80%;
	transition: top 0.2s;
	box-shadow: 4px 4px 8px rgba(0, 0, 0, 0.5);
	z-index: 6;
}

.show-alert {
	top: 11%;
	transition: top 0.2s ease 0.2s;
}

.alert-text {
	margin-top: 0.5rem;
	width: auto;
	color: #eee;
}

.alert-header {
	font-size: 1.125rem;
	color: #fff;
}

/* Mobile M / L */
@media (max-width:768px) {
	.sidenav-open {
		width: 50vw;
		transition: width .2s;
	}

	.main-shift-left {
		transform: translateX(50vw);
		transition: transform .2s;
	}
	.large-screen-only{
		display: none;
	}
}

/* Tablet / Small laptop */
@media(min-width: 768px) {
	main {
		height: 100%;
		width: 75%;
		left: 25%;
	}

	nav {
		width: 75vw;
	}

	.sidenav {
		width: 25vw;
		display: block;
		left: 0;
		box-shadow: 4px 0px 8px rgba(0, 0, 0, 0.5);
	}

	.nav-item {
		width: 100%;
	}

	.nav-trigger {
		display: none;
	}

	.container {
		width: 100%;
	}

	.modal-content {
		/* Need to subtract 20% due to sidenav */
		width: 75vw;
		transition: transform 0.2s ease;
	}
	
	.large-screen-only{
		display: table-cell;
	}
}