body {
	margin-left: 7%;
	margin-right: 10%;
	font-family: sans-serif;
}

h1 {
	text-align: center;
}

h1 a {
	color: black;
	text-decoration: none;
}

.hidden {
	display: none;
}

x-login[hidden], #detectors[hidden] {
	/*todo: apply general .hidden style */
	display: none;
}

x-outliers {
	display: block;
	margin: 0 auto;
	#detectors {
		margin-bottom: 50px;
	}
}

x-login {
	display: block;
	text-align: center;

	form {
		display: inline-block;
		margin-left: auto;
		margin-right: auto;
		text-align: center;
	}
	input {
		display: inline-block;
		box-shadow: none;
		margin-bottom: 10px;
		border: 1.5px solid black;
		padding: 2px 10px;
		border-radius: 7px;
		font-size: 0.95rem;
		font-weight: 400;
	}
	button {
		display: inline-block;
		background-color: white;
		border: 1.5px solid black;
		border-radius: 7px;
		cursor: pointer;
		font-size: 1rem;
		font-weight: 400;
		margin: 0 5px;
		padding: 2px 10px;
		text-align: center;
		transition: background-color 0.1s ease;
	}
	button:hover {
		box-shadow: 0 0 0px 1px black;
	}
	button:active {
		background-color: #eee;
	}
	#invalidpassword {
		font-weight: bold;
		color: black;
	}
}

x-detector {
	display: block;
	margin-bottom: 50px;

	.collapse-sign {
		color: #00000000;
		cursor: pointer;
		min-width: 0.8em;
		text-align: center;
		font-size: 1.2em;
		user-select: none;
	}
	&:hover .collapse-sign {
		color: black;
	}
	.detector-header {
		display: flex;
		justify-content: space-between;
		align-items: center;
		margin-bottom: 0.5em;

		.left {
			display: flex;
			align-items: center;
			gap: 10px;
			flex: 0 0 auto;
			cursor: pointer;
		}
		.left h3 {
			margin: 0;
			line-height: 1;
			display: inline-flex;
			align-items: center;
		}
		.left .info {
			display: inline-flex;
			align-items: center;
			justify-content: center;
			min-width: 1.2em;
			min-height: 1.2em;
			border-radius: 50%;
			border: 1.5px solid black;
			background-color: #fff;
			color: black;
			font-style: italic;
			font-weight: normal;
			font-size: 1em;
			line-height: 1;
			cursor: pointer;
			padding: 0;
			margin-top: 2px; /* align with h3 text */
		}
		button.info:hover {
			box-shadow: 0 0 0px 1px black;
			font-weight: bold;
		}
		button.info:active {
			background-color: #eee;
		}
		.daterange {
			flex: 0 0 auto;
			border: none;
			font-style: italic;
			outline: none;
			margin: 0 15px;
		}
		.outliers-text {
			flex: 1 0 auto;
			text-align: center;
			font-style: italic;
			min-height: 1em;
			cursor: pointer;
			/* todo: center relative to the page */
		}
		.right {
			flex: 0 0 auto;
			text-align: right;
		}
		.right .schedule {
			font-style: italic;
			font-size: 0.9rem;
			display: inline-block;
			max-width: 120px;
			vertical-align: middle;
			margin: 0 5px;
		}
		button.update,
		button.cancel,
		button.onoff {
			display: inline-block;
			background-color: white;
			border: 1.5px solid black;
			border-radius: 7px;
			cursor: pointer;
			font-size: 1rem;
			font-weight: 400;
			margin: 0 5px;
			padding: 5px 10px;
			min-width: 3rem;
			text-align: center;
			white-space: nowrap;
			transition: background-color 0.1s ease;
		}
		button.onoff.off {
			background-color: #ddd;
		}
		button.update:hover,
		button.cancel:hover,
		button.onoff:hover {
			box-shadow: 0 0 0px 1px black;
		}
		button.update:active,
		button.cancel:active,
		button.onoff:active {
			background-color: #eee;
		}
		button.hidden {
			/* todo: apply general .hidden style */
			display: none;
		}
		.last-update {
			font-style: italic;
			font-size: small;
		}
	}
	.plots {
		display: flex;
		flex-direction: column;
		align-items: center;
		gap: 20px;
		margin: 20px auto;
	}
	.plots.hidden {
		display: none;
	}
	.plot-wrapper {
		display: grid;
		grid-template-columns: 10% 70% 20%; /* Dim | Plot | List */
		align-items: start;
		gap: 20px;
		width: 100%;
	}
	.dim-title {
		display: flex;
		font-weight: bold;
		text-align: center;
		padding-top: 1rem;
		align-self: stretch;
		cursor: pointer;
	}
	.dim-title .collapse-fill {
		color: #00000000;
		cursor: pointer;
		min-width: 0.8em;
		text-align: center;
		font-size: 1.2em;
		user-select: none;
		margin-right: 10px; /*.detector-header.left gap 10px*/
	}
	.uplot {
		width: 100%;
		height: 300px; 
		flex: 1 1 auto;
	}
	.uplot-legend {
		padding-top: 1rem;
		align-self: stretch;
		
		tr.u-series {
			text-align: left;
		}
	}
	.detector-info {
		display: grid;
		grid-template-columns: max-content 1fr;
		row-gap: 0.25rem;
		column-gap: 0.5rem;
		margin-top: 0.5rem;
		margin-left: calc(1em + 10px); /* align with dim-title text */
		align-items: center;
		background-color: #f5f5f5;
		font-family: monospace;
		border-radius: 7px;
		padding: 0.5rem;
		p {
			margin: 0;
			display: contents;
		}
		p span.label {
			font-weight: bold;
			text-align: left;
			padding-right: 0.5rem;
		}
		p span.value {
			text-align: left;
		}
	}
	.detector-info.hidden {
		display: none;
	}
}