/* The depth gauge ([midground_depth]): the cursor of the dive's ruler. It sits in the ruler
   column at the left edge, at the middle of the screen, with a tick pointing at the depth it
   reads – so it never lies over the words. */
.mgs-depth {
	position: fixed;
	left: 0;
	top: 50%;
	z-index: 40;
	box-sizing: border-box;
	width: 88px;
	display: grid;
	justify-items: center;
	gap: 3px;
	padding: 10px 6px 11px;
	border-radius: 0 12px 12px 0;
	background: color-mix( in srgb, #0b1418 82%, transparent );
	-webkit-backdrop-filter: blur( 8px );
	backdrop-filter: blur( 8px );
	color: #f5f2ec;
	text-align: center;
	opacity: 0;
	transform: translateY( -50% );
	transition: opacity 0.35s ease;
	pointer-events: none;
}

/* The tick: where the reading is taken. */
.mgs-depth::after {
	content: "";
	position: absolute;
	left: 100%;
	top: 50%;
	width: 12px;
	border-top: 2px solid #8fd3d1;
}

.mgs-depth.is-on {
	opacity: 1;
}

.mgs-depth__label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: #a9b6b4;
}

.mgs-depth__reading {
	display: flex;
	align-items: baseline;
	justify-content: center;
	gap: 2px;
	line-height: 1;
	white-space: nowrap;
}

.mgs-depth__value {
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
}

.mgs-depth__sep {
	font-variant-numeric: normal;
}

.mgs-depth__unit {
	font-size: 13px;
	font-weight: 700;
	color: #8fd3d1;
}

.mgs-depth__more {
	display: grid;
	font-size: 9.5px;
	font-weight: 600;
	line-height: 1.25;
	color: #f0c9a0;
	min-height: 2.5em;
	white-space: nowrap;
}

.mgs-depth__more b {
	font-size: 11px;
	font-weight: 800;
}

/* At the bottom: the full depth, in sand. */
.mgs-depth.is-bottom .mgs-depth__value,
.mgs-depth.is-bottom .mgs-depth__unit {
	color: #f0c9a0;
}

.mgs-depth.is-bottom::after {
	border-top-color: #f0c9a0;
}

/* Phones: the same cursor in the narrower ruler. */
@media ( max-width: 767.98px ) {
	.mgs-depth {
		width: 52px;
		gap: 2px;
		padding: 8px 2px 9px;
		border-radius: 0 10px 10px 0;
	}

	.mgs-depth::after {
		width: 8px;
	}

	.mgs-depth__label {
		font-size: 8.5px;
		letter-spacing: 0.08em;
	}

	.mgs-depth__reading {
		flex-direction: column;
		align-items: center;
		gap: 1px;
	}

	.mgs-depth__value {
		font-size: 16px;
		letter-spacing: -0.02em;
	}

	.mgs-depth__unit {
		font-size: 10px;
	}

	.mgs-depth__more {
		display: none;
	}
}

@media ( prefers-reduced-motion: reduce ) {
	.mgs-depth {
		transition: none;
	}
}
