/* Circumference calculator — shell extras + 3D diagram (loads only with this calculator). */

.pc-calc-shell[data-calculator="circumference"] .pc-diagram-frame {
	/* Locked height — prevents Steps↔Diagram tab switch from growing the box. */
	height: 290px;
	min-height: 290px;
	max-height: 290px;
}

.pc-calc-shell[data-calculator="circumference"] .pc-diagram--3d-only {
	position: relative;
	flex: 1;
	height: 100%;
	min-height: 0;
	padding: 0;
	overflow: hidden;
	border-radius: var(--pc-radius-sm);
	border: 1px solid var(--pc-border);
	background: var(--pc-diagram-bg);
	align-items: stretch;
	justify-content: stretch;
}

.pc-calc-shell[data-calculator="circumference"] .pc-diagram--3d {
	position: absolute;
	inset: 0;
	flex: none;
	height: auto;
	min-height: 0;
	padding: 0;
	overflow: hidden;
	border: 0;
	border-radius: inherit;
	background: transparent;
	cursor: grab;
	touch-action: none;
}

.pc-calc-shell[data-calculator="circumference"] .pc-diagram-formula {
	max-width: min(52%, 220px);
}

.pc-calc-shell[data-calculator="circumference"] .pc-diagram-formula-text,
.pc-calc-shell[data-calculator="circumference"] .pc-diagram-formula .pc-shape-formula-text {
	color: var(--pc-navy) !important;
	font-size: 14px;
	text-shadow: none;
}

.pc-calc-shell[data-calculator="circumference"] .pc-diagram--3d:active {
	cursor: grabbing;
}

.pc-calc-shell[data-calculator="circumference"] .pc-diagram--3d.is-term-hover {
	cursor: pointer;
}

.pc-calc-shell[data-calculator="circumference"] .pc-diagram-3d-canvas {
	display: block;
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	min-height: 0;
}

.pc-calc-shell[data-calculator="circumference"] .pc-diagram-3d-labels {
	position: absolute !important;
	inset: 0;
	pointer-events: none;
	overflow: hidden;
}

.pc-calc-shell[data-calculator="circumference"] .pc-diagram-3d-hint {
	position: absolute;
	top: 0.65rem;
	left: 0.75rem;
	right: auto;
	max-width: 42%;
	margin: 0;
	pointer-events: none;
	z-index: 2;
	font-family: var(--pc-font, system-ui, sans-serif);
	font-size: 0.7rem;
	line-height: 1.3;
	color: var(--pc-muted, #a8a8a8);
}

.pc-calc-shell[data-calculator="circumference"] .pc-diagram-3d-summary {
	position: absolute;
	right: 0.75rem;
	bottom: 0.65rem;
	margin: 0;
	pointer-events: none;
	z-index: 2;
	padding: 0.3rem 0.55rem;
	border-radius: 6px;
	background: rgba(20, 20, 20, 0.88);
	border: 1px solid rgba(161, 81, 237, 0.55);
	color: #ffffff;
	font-family: var(--pc-font, system-ui, sans-serif);
	font-size: 0.8rem;
	font-weight: 700;
	letter-spacing: 0.01em;
}

.pc-calc-shell[data-calculator="circumference"] .pc-3d-dim-label {
	padding: 0.18rem 0.45rem;
	border-radius: 4px;
	background: rgba(20, 20, 20, 0.88);
	border: 1px solid rgba(161, 81, 237, 0.5);
	color: #f2e9ff;
	font-family: var(--pc-font, system-ui, sans-serif);
	font-size: 11px;
	font-weight: 650;
	line-height: 1.2;
	white-space: nowrap;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
	user-select: none;
	transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.pc-calc-shell[data-calculator="circumference"] .pc-3d-dim-label--interactive {
	pointer-events: auto;
	cursor: pointer;
}

.pc-calc-shell[data-calculator="circumference"] .pc-3d-dim-label.is-glow {
	background: rgba(255, 229, 102, 0.95);
	border-color: #ffe566;
	color: #1a1420;
	box-shadow: 0 0 0 1px rgba(255, 229, 102, 0.4);
}

.pc-calc-shell[data-calculator="circumference"] .pc-formula-term {
	cursor: pointer;
	padding: 0 0.12em;
	border-radius: 4px;
	transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.pc-calc-shell[data-calculator="circumference"] .pc-formula-term:hover,
.pc-calc-shell[data-calculator="circumference"] .pc-formula-term.is-glow {
	background: rgba(255, 229, 102, 0.28);
	color: #ffe566;
	box-shadow: 0 0 0 1px rgba(255, 229, 102, 0.45), 0 0 12px rgba(255, 229, 102, 0.35);
}
