/*
Call counts on the navy-band geodesic sphere (world.png).

The picture stays. Each label is stacked and centered inside one
triangle, small enough that the words stay inside that facet when
the ball turns and the type stays upright. Thin gold wires join a
few of those triangles edge to edge. The script copies the picture's
transform onto the label layer, so the counts and the wires travel
with the facets. The words are turned back by that same angle.
Extra plans hide when the sphere is narrow so a phone does not stack
unreadable type. Reduced motion keeps the ball and the labels still;
the script does not tick.
*/

.nv-call-sphere {
	position: relative;
}

.nv-call-layer {
	position: absolute;
	pointer-events: none;
	z-index: 2;
	overflow: visible;
	container-type: inline-size;
	transform-origin: center center;
	--nv-call-turn: 0deg;
	transition: none;
}

.nv-call-wires {
	position: absolute;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: visible;
	z-index: 1;
}

.nv-call-wire {
	fill: none;
	stroke: #f6d78a;
	stroke-width: 0.32;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.nv-call-wire--glow {
	stroke: #f3d48a;
	stroke-width: 0.72;
	stroke-opacity: 0.32;
}

.nv-call-chip {
	position: absolute;
	z-index: 2;
	width: max-content;
	max-width: none;
	margin: 0;
	transform: translate(-50%, -50%);
	color: #f4feff;
	font-family: var(--tp-ff-body, "DM Sans", sans-serif);
	font-size: clamp(5px, 1.45cqi, 8.5px);
	font-weight: 600;
	line-height: 1.05;
	letter-spacing: 0;
	text-align: center;
	text-shadow:
		0 1px 1px #020618,
		0 0 2px #020618;
	user-select: none;
	transition: none;
}

.nv-call-face {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: max-content;
	transform: rotate(var(--nv-call-turn, 0deg));
	transform-origin: center center;
	transition: none;
}

.nv-call-plan,
.nv-call-count {
	display: block;
	white-space: nowrap;
}

.nv-call-count {
	color: #d7fbff;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	font-feature-settings: "tnum";
}

/* The bright front facet is nearly white, so that one label is ink. */
.nv-call-chip--lit {
	color: #071828;
	text-shadow: 0 0 1px rgba(255, 255, 255, 0.45);
}

.nv-call-chip--lit .nv-call-count {
	color: #071828;
}

@container (max-width: 360px) {
	.nv-call-chip:not(.nv-call-chip--phone),
	.nv-call-link--desk {
		display: none;
	}

	.nv-call-chip {
		font-size: clamp(5px, 1.6cqi, 8px);
	}
}

@media (max-width: 767px) {
	.nv-call-chip:not(.nv-call-chip--phone),
	.nv-call-link--desk {
		display: none;
	}

	.nv-call-chip {
		font-size: clamp(5px, 1.6cqi, 8px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.nv-call-sphere img,
	.nv-call-layer,
	.nv-call-face,
	.nv-call-chip,
	.nv-call-wires,
	.nv-call-count {
		transition: none !important;
		animation: none !important;
	}

	.nv-call-sphere img,
	.nv-call-layer,
	.nv-call-face {
		transform: none !important;
	}
}
