/**
 * Interactive odontogram (dental chart) for questionnaire fields of type `tooth`.
 * Clean vector chart laid out along two anatomical arches. Uses literal colours
 * so it renders consistently in both wp-admin and the patient portal.
 */

.nh-odontogram {
	margin: 8px 0;
	max-width: 100%;
}

.nh-odontogram-chart {
	max-width: 420px;
	margin: 0 auto;
}

.nh-odontogram-svg {
	width: 100%;
	height: auto;
	display: block;
	touch-action: manipulation;
}

.nh-tooth {
	cursor: pointer;
	outline: none;
}

.nh-tooth-shape {
	fill: #ffffff;
	stroke: #94a3b8;
	stroke-width: 1.3;
	transition: fill 0.15s ease, stroke 0.15s ease;
}

.nh-tooth-groove {
	stroke: #cbd5e1;
	stroke-width: 1;
	stroke-linecap: round;
	transition: stroke 0.15s ease;
}

.nh-tooth-num {
	font-size: 9px;
	font-weight: 600;
	fill: #64748b;
	pointer-events: none;
	transition: fill 0.15s ease;
}

.nh-tooth:hover .nh-tooth-shape {
	stroke: #18509c;
	fill: #eff5ff;
}

.nh-tooth:focus-visible .nh-tooth-shape {
	stroke: #18509c;
	stroke-width: 2;
}

.nh-tooth.is-selected .nh-tooth-shape {
	fill: #ef4444;
	stroke: #b91c1c;
}

.nh-tooth.is-selected .nh-tooth-groove {
	stroke: rgba(255, 255, 255, 0.6);
}

.nh-tooth.is-selected .nh-tooth-num {
	fill: #ffffff;
	font-weight: 700;
}

.nh-odontogram.is-readonly .nh-tooth {
	cursor: default;
}

/* Teeth without a matching question in this questionnaire are not selectable. */
.nh-tooth.is-disabled {
	cursor: default;
	opacity: 0.4;
}

.nh-tooth.is-disabled .nh-tooth-shape {
	fill: #f1f5f9;
	stroke: #cbd5e1;
}

.nh-tooth.is-disabled:hover .nh-tooth-shape {
	fill: #f1f5f9;
	stroke: #cbd5e1;
}

.nh-odontogram-summary {
	margin: 10px 0 0;
	font-size: 13px;
	text-align: center;
}

.nh-odontogram-summary-label {
	color: #64748b;
	margin-right: 4px;
}

.nh-odontogram-summary-list {
	font-weight: 700;
	color: #b91c1c;
}

/* Per-tooth questions driven by the chart controller are hidden (asked once). */
.nh-q-tooth-controlled {
	display: none !important;
}
