/*                */
/* Align elements */
/*                */

.align-center {
	text-align: center;
}

.align-right {
	text-align: right;
}

/*      */
/* Body */
/*      */

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

body {
	background-color: white;
	color: black;

	font-family: Arial, sans-serif;
	font-size: 1rem;
	font-style: normal;
	font-weight: 400;
}

/*               */
/* Bottom drawer */
/*               */

.bottom-drawer {
	background-color: #cbcece;
	bottom: -100%;
	padding: 20px;
	position: fixed;
	right: 0;
	text-align: center;
	transition: bottom 0.3s ease;
	z-index: 10;
}

@media only screen and (max-width: 960px) {
	.bottom-drawer {
		width: calc(100% - 60px);
	}
}

@media only screen and (min-width: 960px) {
	.bottom-drawer {
		width: calc(100% - 200px);
	}
}

.bottom-drawer.open {
	bottom: 50px;
}

/*              */
/* Box elements */
/*              */

.center-box {
	margin-bottom: 20px;
	text-align: center;
	width: 100%;
}

.grid-box-150 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
	grid-template-rows: auto;
	gap: 20px;
	margin-bottom: 20px;
	width: 100%;
}

.grid-box-200 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	grid-template-rows: auto;
	gap: 20px;
	margin-bottom: 20px;
	width: 100%;
}

.grid-box-250 {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	grid-template-rows: auto;
	gap: 20px;
	margin-bottom: 20px;
	width: 100%;
}

.headline-box {
	margin-bottom: 20px;
	margin-top: 20px;
	width: 100%;
}

.standard-box {
	margin-bottom: 20px;
	width: 100%;
}

/*                   */
/* Chart.js elements */
/*                   */

canvas {
	display: block;
	height: 100% !important;
	width: 100% !important;
}

.chart-container {
	height: 400px;
	position: relative;
	width: 100%;
}

/*        */
/* Colors */
/*        */

.black {
	color: black;
}

.blue {
	color: #3680ff;
}

.darkgrey {
	color: #aaaeaf;
}

.green {
	color: #01801f;
}

.lightgrey {
	color: #cbcece;
}

.orange {
	color: #f7991c;
}

.red {
	color: #ff363e;
}

/*       */
/* Flags */
/*       */

.flag-da {
	background-image: url(../media/flags/da.png);
	background-size: cover;
	display: inline-block;
	height: 40px;
	opacity: 0.5;
	width: 40px;
}

.flag-de {
	background-image: url(../media/flags/de.png);
	background-size: cover;
	display: inline-block;
	height: 40px;
	opacity: 0.5;
	width: 40px;
}

.flag-en {
	background-image: url(../media/flags/en.png);
	background-size: cover;
	display: inline-block;
	height: 40px;
	opacity: 0.5;
	width: 40px;
}

.flag-selected {
	opacity: 1;
}

/*                */
/* Float elements */
/*                */

.float-right {
	float: right;
}

/*                 */
/* Footer elements */
/*                 */

.footer-text {
	padding-bottom: 15px;
	padding-top: 15px;
}

/*               */
/* Form elements */
/*               */

button {
	background-color: #aaaeaf;
	font-family: Arial, sans-serif;
	font-weight: 400;
	font-style: normal;
	font-size: 1rem;
	padding: 5px;
	transition: background-color 0.3s ease, color 0.3s ease;
}

button:hover {
	background-color: #f7991c;
	cursor: pointer;
}

button:disabled:hover {
	background-color: #aaaeaf;
	cursor: not-allowed;
}

input {
	background-color: white;
	color: black;
	padding: 5px;
}

input[type="radio"] {
	accent-color: #01363e;
}

select {
	background-color: white;
	color: black;
	padding: 5px;
	width: 200px;
}

/*                 */
/* Header elements */
/*                 */

.header-box {
	color: white;
	float: right;
	margin-right: 20px;
	margin-top: 10px;
}

.header-gear {
	color: white;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.header-logo {
	margin-bottom: 10px;
	margin-left: 20px;
	margin-top: 10px;
	width: 120px;
}

.header-settings-box {
	cursor: pointer;
	float: right;
	font-size: 1.8rem;
	margin-left: 10px;
}

.header-user-box {
	float: left;
	font-size: 0.9rem;
	text-align: right;
}

/*           */
/* Headlines */
/*           */

h1 {
	font-size: 2rem;
	margin-bottom: 20px;
}

h2 {
	font-size: 1.5rem;
	margin-bottom: 20px;
}

h3 {
	font-size: 1rem;
	margin-bottom: 10px;
}

.caret {
	font-size: 1.5rem;
}

/*               */
/* Home elements */
/*               */

.home-container {
	display: grid;
	grid-template-areas:
		'header'
		'main'
		'footer';
	grid-template-columns: auto;
	grid-template-rows: 50px auto 50px;
	gap: 0;
	height: 100dvh;
	width: 100%;
}

.home-error-box {
	color: #ff363e;
	left: 50%;
	position: absolute;
	top: 60%;
	text-align: center;
	transform: translate(-50%, -50%);
	width: 80%;
}

.home-error-flags {
	margin-bottom: 10px;
}

.home-error-hide {
	display: none;
}

.home-header {
	background-color: #01363e;
	grid-area: header;
}

.home-main {
	background-image: url("../media/watermark.png");
	background-position: center;
	background-repeat: no-repeat;
	background-size: contain;
	grid-area: main;
	overflow-x: auto;
	overflow-y: auto;
	padding: 20px;
}

.home-footer {
	background-color: #01363e;
	color: white;
	grid-area: footer;
	text-align: center;
}

.login-box {
	left: 50%;
	position: absolute;
	top: 50%;
	transform: translate(-50%, -50%);
}

/*               */
/* Link elements */
/*               */

/* Unvisited link */
a:link {
	color: black;
	text-decoration: none;
	transition: background-color 0.3s ease, color 0.3s ease;
}

/* Visited link */
a:visited {
	color: black;
	text-decoration: none;
}

/* Mouse over link */
a:hover {
	color: #f7991c;
	cursor: pointer;
	text-decoration: none;
}

/* Selected link */
a:active {
	color: black;
	text-decoration: none;
}

.active:hover {
	color: #f7991c;
	cursor: pointer;
}

/*               */
/* Logo elements */
/*               */

.logomark-loading {
	animation: fadeInOut 2s infinite;
	width: 50%;
}

@keyframes fadeInOut {
	0%, 100% {
		opacity: 5%;
	}
	50% {
		opacity: 1;
	}
}

.logomark-static {
	width: 50%;
}

/*                 */
/* Margin elements */
/*                 */

.margin-left-5 {
	margin-left: 5px;
}

.margin-left-10 {
	margin-left: 10px;
}

.margin-right-5 {
	margin-right: 5px;
}

.margin-right-10 {
	margin-right: 10px;
}

/*               */
/* Menu elements */
/*               */

.menu-icon {
	color: white;
	font-size: 1rem;
	margin-right: 10px;
}

.menu-icon-picked {
	color: black;
	font-size: 1rem;
	margin-right: 10px;
}

.menu-item {
	color: white;
	font-weight: bold;
	padding: 20px 0 20px 20px;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.menu-item:hover {
	background-color: #f7991c;
	cursor: pointer;
}

.menu-item-picked {
	background-color: white;
	color: black;
	font-weight: bold;
	padding: 20px 0 20px 20px;
	transition: background-color 0.3s ease, color 0.3s ease;
}

.menu-item-picked:hover {
	background-color: #f7991c;
	cursor: pointer;
}

@media only screen and (max-width: 960px) {
	.menu-text {
		display: none;
	}
}

@media only screen and (min-width: 960px) {
	.menu-text {
		display: inline;
	}
}

/*               */
/* Page elements */
/*               */

.page-container {
	display: grid;
	grid-template-areas:
		'header header'
		'menu main'
		'footer footer';
	grid-template-rows: 50px auto 50px;
	gap: 0;
	height: 100dvh;
	width: 100%;
}

@media only screen and (max-width: 960px) {
	.page-container {
		grid-template-columns: 60px auto;
	}
}

@media only screen and (min-width: 960px) {
	.page-container {
		grid-template-columns: 200px auto;
	}
}

.page-header {
	background-color: #01363e;
	grid-area: header;
}

.page-menu {
	background-color: #01363e;
	color: white;
	grid-area: menu;
}

.page-main {
	grid-area: main;
	overflow-x: auto;
	overflow-y: auto;
	padding: 20px;
}

.page-footer {
	background-color: #01363e;
	color: white;
	grid-area: footer;
	text-align: center;
	z-index: 100;
}

/*           */
/* Pie timer */
/*           */

.pie-timer {
	background-color: white;
	border: 0.1em solid var(--color);
	border-radius: 50%;
	--color: #f7991c;
	display: inline-block;
	font-size: 65%;
	height: 1em;
	margin-left: 5px;
	position: relative;
	width: 1em;
}

.pie-timer::before,
.pie-timer::after {
	border-radius: 0.5em 0 0 0.5em;
	content: '';
	height: 100%;
	left: 0;
	position: absolute;
	transform-origin: center right;
	width: 50%;
}

.pie-timer::before {
	background-color: white;
	z-index: 1;
}

.pie-timer::after {
	background-color: var(--color);
}

.pie-timer-1m::before,
.pie-timer-1m::after {
	animation-duration: 60s;
	animation-fill-mode: forwards;
	animation-iteration-count: 1;
}

.pie-timer-5m::before,
.pie-timer-5m::after {
	animation-duration: 300s;
	animation-fill-mode: forwards;
	animation-iteration-count: 1;
}

.pie-timer::before {
	animation-name: pie-mask;
	animation-timing-function: steps(1);
}

.pie-timer::after {
	animation-name: pie-rotate;
	animation-timing-function: linear;
}

@keyframes pie-mask {
	50%,
	100% {
		background-color: var(--color);
		transform: rotate(0.5turn);
	}
}

@keyframes pie-rotate {
	to {
		transform: rotate(1turn);
	}
}

/*                   */
/* SKAKOMAT elements */
/*                   */

.skakomat {
	border: 1px solid #aaaeaf;
	border-radius: 10px;
	margin-bottom: 10px;
	padding: 10px;
}

/*                   */
/* Standard elements */
/*                   */

i {
	transition: background-color 0.3s ease, color 0.3s ease;
}

/*                */
/* Table elements */
/*                */

table {
	border-spacing: 0;
	width: 100%;
}

th {
	background-color: #aaaeaf;
	padding: 10px 10px 10px 10px;
	text-align: left;
}

tr:nth-child(even) {
  background-color: #cbcece;
}

tr:nth-child(odd) {
  background-color: #aaaeaf;
}

td {
	padding: 10px 10px 10px 10px;
}

.action {
	width: 20px;
}

/*               */
/* Tabs elements */
/*               */

.tabs {
	background-color: #cbcece;
	display: flex;
	flex-wrap: wrap;
	margin-bottom: 20px;
	width: 100%;
}

.tab-label {
	background-color: #cbcece;
	order: 1;
	padding: 10px;
	text-align: center;
	transition: background 0.3s ease;
}

.tab-label:hover {
	background-color: #f7991c;
	cursor: pointer;
}

.tab-content {
	background-color: white;
	border: 2px solid #aaaeaf;
	display: none;
	flex-grow: 1;
	order: 99;
	width: 100%;
	box-sizing: border-box;
}

/* Radio button logic */
.tabs input[type="radio"] {
	display: none;
}

.tabs input[type="radio"]:checked + .tab-label {
	background-color: #aaaeaf;
	font-weight: bold;
}

.tabs input[type="radio"]:checked + .tab-label + .tab-content {
	display: block;
}

/* Responsive design */
@media (max-width: 960px) {
	.tab-label {
		width: 100%;
	}
}

/*                    */
/* Toast box elements */
/*                    */

.toast-box {
	min-height: 53px;
	margin-right: 20px;
	position: fixed;
	right: 0;
	text-align: center;
	top: 125px;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	z-index: 20;
}

@media only screen and (max-width: 960px) {
	.toast-box {
		margin-left: 80px;
		width: calc(100% - 100px);
	}
}

@media only screen and (min-width: 960px) {
	.toast-box {
		margin-left: 220px;
		width: calc(100% - 240px);
	}
}

.toast-btn {
	color: white;
	font-size: 1rem;
	margin-right: 10px;
	padding: 5px;
	position: absolute;
	right: 0;
	top: 50%;
	transform: translate(0, -50%);
}

.toast-btn:hover {
	background-color: #f7991c;
	cursor: pointer;
}

.toast-icon {
	color: white;
	font-size: 2rem;
	left: 0;
	margin-left: 10px;
	position: absolute;
	top: 50%;
	transform: translate(0, -50%);
}

.toast-info {
	background-color: #3680ff;
}

.toast-success {
	background-color: #01801f;
}

.toast-warning {
	background-color: #f7991c;
}

.toast-progress {
	bottom: 0;
	height: 3px;
	left: 0;
	overflow: hidden;
	position: absolute;
	width: 100%;
}

.toast-progress:before {
	animation: toast-progress 5s linear forwards;
	background-color: white;
	content: "";
	position: absolute;
	bottom: 0;
	right: 0;
	height: 100%;
	width: 100%;
}

@keyframes toast-progress {
	100% {
		right: 100%;
	}
}

.toast-text {
	color: white;
	margin: 0 50px 0 50px;
	padding: 20px 0 20px 0;
}

/*                  */
/* Tooltip elements */
/*                  */

.tooltip {
	border-bottom: 1px dotted black;
	display: inline-block;
	position: relative;
}

.tooltip .tooltiptext {
	background-color: black;
	border-radius: 5px;
	color: white;
	font-size: 1rem;
	font-style: normal;
	font-weight: 400;
	opacity: 0;
	padding: 5px;
	position: absolute;
	text-align: center;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	visibility: hidden;
	width: max-content;
	z-index: 1;
}

.tooltip:hover .tooltiptext {
	opacity: 1;
	visibility: visible;
}

.tooltip .tooltiptext-bottom {
	left: 50%;
	top: 120%;
	transform: translateX(-50%);
}

.tooltip .tooltiptext-left {
	right: 105%;
	top: -5px;
}

.tooltip .tooltiptext-right {
	left: 105%;
	top: -5px;
}

.tooltip .tooltiptext-top {
	bottom: 120%;
	left: 50%;
	transform: translateX(-50%);
}
