/** GENERAL **/
.spinner {
	padding-right: 0.5em;
	height: 1.2em;
}

.hidden {
	display: none;
}

/** LOG VIEWER **/
form li,
ul.sync-list li {
	list-style: none;
}

ul.sync-list,
form ul {
	padding: 0;
}

.sync-filter {
	margin-bottom: 2rem;
}

.sync-entry {
	padding: 0.5rem 0;
}

.sync-entry h2 {
	margin-top: 0;
	font-size: 1.2rem;
	margin-bottom: 1rem;
}

.error-badges {
	display: flex;
	gap: 1rem;
	padding: 0;
}

.error-badges__badge {
	background-color: var(--message-error-bg);
	border-radius: 2px;
	padding: 0.3rem 0.5rem;
	font-size: 0.75rem;
	list-style-type: none;
}

.log-details-heading {
	font-size: 1rem;
	font-weight: bold;
	margin-bottom: 1rem;
}

.log-table {
	width: 100%;
}

.log-table th {
	position: sticky;
	padding: 0.8em 1em;
	top: 0;
	border: 0;
	background-color: #619ab2;
	color: white;
	font-weight: bold;
}

.log-table td {
	padding: 0.2em 1em;
}

.log-table tr:hover td {
	background-color: #ddd;
}

.log-table td.level-critical,
.log-table td.level-error {
	color: red;
	font-weight: bold;
}

.log-table td.level-warning {
	color: rgb(216, 191, 48);
	font-weight: bold;
}

.more-button-row {
	display: flex;
	justify-content: center;
}

.more-button-row > .more-button {
	display: flex;
	align-items: center;
	background: none;
	border: none;
	padding: 0;
	color: var(--link-fg);
	cursor: pointer;
}

.more-button-row > .more-button:hover {
	text-decoration: underline;
}

/** STATUS STYLES **/

.status-wrapper {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 10px;
	align-items: start;
	max-width: 100rem;
}

.status {
	padding: 1.4rem 1.2rem;
	margin-bottom: 4rem;
	background: linear-gradient(
		45deg,
		hsl(5.5, 95.6%, 82.2%),
		hsl(5.5, 95.6%, 89.2%)
	);
	border-radius: 4px;
}

.status > h3 {
	font-size: 1.3rem;
	margin: 0;
}

.status,
.status > h3,
.status > h4 {
	color: #444;
}

table.details {
	color: var(--body-fg);
}

.status.status-ok {
	background: linear-gradient(
		45deg,
		hsl(108.7, 57%, 70.8%),
		hsl(108.7, 57%, 80.8%)
	);
}

.status.status-warn {
	background: linear-gradient(
		45deg,
		hsl(50.7, 100%, 70.8%),
		hsl(50.7, 100%, 82.8%)
	);
}

/** AED REMOVED ALWAYS CRITICAL **/
.status.status-ok.aed-removed,
.status.status-warn.aed-removed {
	background: linear-gradient(
		45deg,
		hsl(5.5, 95.6%, 82.2%),
		hsl(5.5, 95.6%, 89.2%)
	);
}

.status .info {
	background-color: rgba(0, 0, 0, 0.1);
	padding: 1rem;
	font-weight: bolder;
	margin-bottom: 1rem;
}

.status-details {
	margin-bottom: 0.5rem;
}

.info-text {
	text-decoration: underline;
	color: var(--link-fg);
	cursor: help;
}

/** CONFIG TABLE IN STATUS DETAILS **/

table.config-dump td.line-nr {
	text-align: right;
	color: grey;
}

table.config-dump td {
	font-family: monospace;
}

/** GRAPH STYLES **/
.graph-container {
	display: grid;
	grid-template-columns: 100%;
	gap: 20px;
}

.graph {
	height: 600px;
}

/** world map styles **/

#worldmap > #map {
	height: 70vh;
	max-height: 100%;
}

/** DATA AND CONFIG DETAILS **/

/** data tiles **/
.data-tiles {
	padding: 20px;
	border-radius: 4px;
	background-color: var(--darkened-bg);
}

.data-tiles-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
	grid-auto-flow: row;
	gap: 20px;
}

.data-tiles .tile {
	padding: 1rem;
	border-radius: 4px;
	background-color: var(--body-bg);
	box-shadow: 0 0 4px 1px rgba(0, 0, 0, 0.1);
	transition: box-shadow 0.1s ease-in-out;
}

.data-tiles .tile:hover {
	box-shadow: 0 10px 12px 1px rgba(0, 0, 0, 0.1);
}

.tile .tile-heading {
	display: flex;
	align-items: center;
	margin-bottom: 1rem;
}

.tile.tile-span-1 {
	grid-column: span 1;
}

.tile.tile-span-2 {
	grid-column: span 1;
}

.tile.tile-span-3 {
	grid-column: span 1;
}

.tile .tile-heading .icon {
	margin-right: 0.2rem;
}

.tile .tile-heading .icon.icon--hover {
	display: none;
}

.tile:hover .tile-heading .icon {
	display: none;
}

.tile:hover .tile-heading .icon.icon--hover {
	display: block;
}

.tile .tile-heading h3 {
	font-weight: bold;
	margin: 0;
	font-size: 0.8rem;
}

.tile .tile-content {
	font-size: 1rem;
}

.tile-content.tile-folded {
	max-height: 32rem;
	overflow-y: scroll;
}

.folding-button-row {
	text-align: center;
}

.folding-button-row button {
	margin-top: 0.8rem;
	background: none;
	color: inherit;
	border: none;
	padding: 4px;
	font: inherit;
	cursor: pointer;
	outline: inherit;
	border-radius: 100%;
	aspect-ratio: 1;
}

.folding-button-row button:hover {
	box-shadow: 0 0 4px 1px rgba(0, 0, 0, 0.1);
}

table.tile-table {
	font-size: 1rem;
	margin-bottom: 0.9rem;
}

table.tile-table td {
	border: none;
	font-size: inherit;
}

table.tile-table td:first-child {
	font-weight: bold;
	padding-left: 0;
}

table.tile-table tr {
	background: var(--body-bg);
}

table.tile-table.config-dump {
	font-size: 0.8rem;
}

table.tile-table.config-dump td {
	padding: 4px;
}

table.tile-table.config-dump td:hover {
	background-color: var(--hairline-color);
}

.tile-content .var-group {
	display: flex;
	gap: 1rem;
	align-items: center;
}

.tile .var-dump {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
	align-items: start;
	margin-bottom: 0.9rem;
}

.tile .var-group.battery-low {
	background-color: var(--message-error-bg);
	border-radius: 4px;
	padding: 0.5rem 1rem 1rem 1rem;
}

.tile .bool-error {
	display: flex;
	align-items: center;
}

.tile .var-value-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
}

.tile .var-value-tag {
	background-color: var(--message-error-bg);
	border-radius: 2px;
	padding: 0.3rem 0.5rem;
	font-size: 0.75rem;
}

@media screen and (min-width: 75rem) {
	.tile.tile-span-1 {
		grid-column: span 1;
	}

	.tile.tile-span-2 {
		grid-column: span 2;
	}

	.tile.tile-span-3 {
		grid-column: span 2;
	}
}

@media screen and (min-width: 100rem) {
	.details {
		display: grid;
		grid-template-columns: min-content 1fr;
		gap: 1rem;
	}
}

/* Badges */

.badge {
	padding: 4px 8px;
	text-align: center;
	border-radius: 5px;
}

.badge.badge-ok {
	background: linear-gradient(
		45deg,
		hsl(108.7, 57%, 70.8%),
		hsl(108.7, 57%, 80.8%)
	);
	color: black;
}

.badge.badge-warn {
	background: linear-gradient(
		45deg,
		hsl(50.7, 100%, 70.8%),
		hsl(50.7, 100%, 82.8%)
	);
	color: black;
}

.badge.badge-alarm {
	background: linear-gradient(
		45deg,
		hsl(5.5, 95.6%, 82.2%),
		hsl(5.5, 95.6%, 89.2%)
	);
	color: black;
}

.badge.badge-gray {
	background: linear-gradient(45deg, #8e8e8e, #7f7f7f);
	color: white;
}
