/*
 * Denta24 Core: case details drawer (patient info + tooth chart).
 * Every selector is prefixed .d24c- so it cannot clash with the theme.
 * Buttons and inputs are fully restyled because themes such as WoodMart
 * restyle bare button / input elements aggressively.
 * Tweak the look through the custom properties on .d24c-root.
 */

.d24c-root {
	--d24c-bg: #ffffff;
	--d24c-surface: #f5f7fb;
	--d24c-border: #dde3ee;
	--d24c-field-border: #8391a8;
	--d24c-text: #12213a;
	--d24c-muted: #5b6a82;
	--d24c-label: #5f6d84;
	--d24c-ok-text: #0c6e4c;
	--d24c-accent: #2c66f2;
	--d24c-accent-dark: #1d4fd8;
	--d24c-accent-soft: #e8efff;
	--d24c-ink: #ffffff;
	--d24c-danger: #d63b3b;
	--d24c-ok: #14996a;
	--d24c-crown: #ffffff;
	--d24c-root-fill: #efdfbf;
	--d24c-stroke: #7d8dab;
	--d24c-curve: 2px;
	--d24c-slide: 100%;

	position: fixed;
	inset: 0;
	z-index: 999990;
	font-size: 15px;
	line-height: 1.45;
	color: var(--d24c-text);
	-webkit-font-smoothing: antialiased;
}

.d24c-root[hidden],
.d24c-root [hidden] {
	display: none !important;
}

.d24c-root[dir="rtl"] {
	--d24c-slide: -100%;
}

.d24c-root *,
.d24c-root *::before,
.d24c-root *::after {
	box-sizing: border-box;
}

html.d24c-lock {
	overflow: hidden;
}

/* Safari before 15.4 does not know :focus-visible and drops those rules whole: it gets the ring through :focus.
   Where :focus-visible exists the second rule takes the ring away again after a mouse click. */
.d24c-close:focus,
.d24c-link:focus,
.d24c-tooth:focus,
.d24c-chip:focus,
.d24c-shade:focus,
.d24c-need:focus,
.d24c-btn:focus,
.d24c-seg input:focus + span {
	outline: 2px solid var(--d24c-accent);
	outline-offset: 2px;
}

.d24c-close:focus:not(:focus-visible),
.d24c-link:focus:not(:focus-visible),
.d24c-tooth:focus:not(:focus-visible),
.d24c-chip:focus:not(:focus-visible),
.d24c-shade:focus:not(:focus-visible),
.d24c-need:focus:not(:focus-visible),
.d24c-btn:focus:not(:focus-visible),
.d24c-seg input:focus:not(:focus-visible) + span {
	outline: 0;
}

/* ---------- overlay and drawer shell ---------- */

.d24c-overlay {
	position: absolute;
	inset: 0;
	background: rgba(10, 20, 40, 0.48);
	opacity: 0;
	transition: opacity 0.25s ease;
}

.d24c-drawer {
	position: absolute;
	inset-block: 0;
	inset-inline-end: 0;
	width: min(680px, 100%);
	display: flex;
	flex-direction: column;
	background: var(--d24c-bg);
	box-shadow: -18px 0 48px rgba(10, 20, 40, 0.22);
	transform: translateX(var(--d24c-slide));
	transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
	outline: 0;
}

.d24c-root[dir="rtl"] .d24c-drawer {
	box-shadow: 18px 0 48px rgba(10, 20, 40, 0.22);
}

.d24c-root.is-open .d24c-overlay {
	opacity: 1;
}

.d24c-root.is-open .d24c-drawer {
	transform: none;
}

/* ---------- header ---------- */

.d24c-head {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 16px 20px;
	border-bottom: 1px solid var(--d24c-border);
	background: var(--d24c-bg);
}

.d24c-prod {
	display: flex;
	align-items: center;
	gap: 12px;
	min-width: 0;
	flex: 1;
}

.d24c-prod__img {
	flex: none;
	width: 52px;
	height: 52px;
	border-radius: 12px;
	object-fit: cover;
	background: var(--d24c-surface);
	border: 1px solid var(--d24c-border);
}

.d24c-prod__img[hidden] {
	display: none;
}

.d24c-eyebrow {
	margin: 0 0 2px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--d24c-accent);
}

.d24c-prod__name {
	margin: 0;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.25;
	color: var(--d24c-text);
	/* Long product names wrap to two lines instead of losing their last word. */
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	overflow: hidden;
	overflow-wrap: anywhere;
}

.d24c-count {
	flex: none;
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	padding: 7px 12px;
	border-radius: 999px;
	background: var(--d24c-surface);
	border: 1px solid var(--d24c-border);
	font-size: 13px;
	color: var(--d24c-muted);
	transition: background 0.2s, border-color 0.2s, color 0.2s;
}

.d24c-count strong {
	font-size: 15px;
	font-variant-numeric: tabular-nums;
	color: var(--d24c-text);
	/* "2 / 3" must read the same way in right to left pages. */
	direction: ltr;
	unicode-bidi: isolate;
}

.d24c-count.is-done {
	background: #e6f6ef;
	border-color: #b6e3d0;
	color: var(--d24c-ok-text);
}

.d24c-count.is-done strong {
	color: var(--d24c-ok-text);
}

.d24c-close {
	all: unset;
	box-sizing: border-box;
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	color: var(--d24c-muted);
	cursor: pointer;
	transition: background 0.15s, color 0.15s;
}

.d24c-close:hover {
	background: var(--d24c-surface);
	color: var(--d24c-text);
}

.d24c-close:focus-visible {
	outline: 2px solid var(--d24c-accent);
	outline-offset: 2px;
}

.d24c-close svg {
	width: 18px;
	height: 18px;
}

/* ---------- body ---------- */

.d24c-body {
	outline: 0;
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: 8px 20px 24px;
}

.d24c-sec {
	padding: 18px 0;
	border-bottom: 1px solid var(--d24c-border);
}

.d24c-sec:last-child {
	border-bottom: 0;
}

.d24c-sec__title {
	display: flex;
	align-items: baseline;
	gap: 4px;
	margin: 0 0 12px;
	font-size: 14px;
	font-weight: 700;
	letter-spacing: 0.01em;
	color: var(--d24c-text);
}

.d24c-sec__title i {
	font-style: normal;
	color: var(--d24c-danger);
}

.d24c-sec__sub {
	margin-inline-start: auto;
	font-size: 12px;
	font-weight: 400;
	color: var(--d24c-muted);
}

.d24c-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}

.d24c-grid .is-wide {
	grid-column: 1 / -1;
}

/* ---------- fields ---------- */

.d24c-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
	margin: 0;
}

.d24c-label {
	font-size: 12.5px;
	font-weight: 600;
	color: var(--d24c-text);
}

.d24c-label i {
	font-style: normal;
	color: var(--d24c-danger);
}

.d24c-label em {
	font-style: normal;
	font-weight: 400;
	color: var(--d24c-muted);
}

.d24c-root .d24c-input {
	-webkit-appearance: none;
	appearance: none;
	display: block;
	width: 100%;
	height: 44px;
	margin: 0;
	padding: 0 12px;
	border: 1px solid var(--d24c-field-border);
	border-radius: 10px;
	background-color: #fff;
	color: var(--d24c-text);
	font: inherit;
	/* 16px: iOS Safari zooms into a field whose text is smaller. */
	font-size: 16px;
	line-height: 1.2;
	box-shadow: none;
	outline: 0;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.d24c-root textarea.d24c-input {
	height: auto;
	min-height: 84px;
	padding: 10px 12px;
	resize: vertical;
}

.d24c-root select.d24c-input {
	padding-inline-end: 34px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%2364748b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
}

.d24c-root[dir="rtl"] select.d24c-input {
	background-position: left 14px center;
}

.d24c-root[dir="rtl"] .d24c-input[dir="ltr"] {
	text-align: right;
}

.d24c-root .d24c-input:focus {
	border-color: var(--d24c-accent);
	box-shadow: 0 0 0 3px var(--d24c-accent-soft);
	outline: 2px solid transparent;
	outline-offset: 0;
}

.d24c-root .d24c-input.has-error {
	border-color: var(--d24c-danger);
}

.d24c-root .d24c-input::placeholder {
	color: #66758b;
	opacity: 1;
}

.d24c-err {
	min-height: 0;
	font-size: 12px;
	color: var(--d24c-danger);
}

.d24c-err:empty {
	display: none;
}

.d24c-sec[data-sec="teeth"] > .d24c-err {
	margin: -4px 0 10px;
}

/* Text for screen readers only. */
.d24c-sr {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0 0 0 0);
	clip-path: inset(50%);
	white-space: nowrap;
	border: 0;
}

/* segmented gender control */

.d24c-seg {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
}

.d24c-seg label {
	position: relative;
	display: block;
	margin: 0;
	cursor: pointer;
}

.d24c-seg input {
	position: absolute;
	opacity: 0;
	pointer-events: none;
}

/* Two real options with their own border, so they do not look like a flat label. */
.d24c-seg span {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 44px;
	border: 1.5px solid var(--d24c-field-border);
	border-radius: 10px;
	background: #fff;
	font-size: 14.5px;
	font-weight: 600;
	color: var(--d24c-text);
	transition: background 0.15s, border-color 0.15s, color 0.15s, box-shadow 0.15s;
}

.d24c-seg label:hover span {
	border-color: var(--d24c-accent);
}

.d24c-seg input:checked + span {
	border-color: var(--d24c-accent);
	background: var(--d24c-accent-soft);
	color: var(--d24c-accent-dark);
	box-shadow: 0 0 0 2px rgba(47, 107, 255, 0.15);
}

.d24c-seg input:checked + span::before {
	content: "";
	width: 14px;
	height: 14px;
	background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231d4fd8' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

.d24c-seg input:focus-visible + span {
	outline: 2px solid var(--d24c-accent);
	outline-offset: 2px;
}

/* ---------- tooth chart ---------- */

/* Banner above the chart: what to do, how many are left, and when the limit is hit. */

.d24c-tipbar {
	display: flex;
	align-items: center;
	gap: 12px;
	/* Same height for a one line and a two line message, so the chart never jumps (narrow phones: see the end of the file). */
	min-height: 76px;
	margin: 0 0 12px;
	padding: 10px 14px;
	border-radius: 14px;
	background: var(--d24c-accent-soft);
	border: 1px solid #c9d9ff;
	transition: background 0.2s, border-color 0.2s;
}

/* A soft badge with the tooth outline: the only hand on the screen is the animated one on the chart. */
.d24c-tipbar__icon {
	flex: none;
	display: inline-grid;
	place-items: center;
	width: 38px;
	height: 38px;
	border-radius: 50%;
	background: #d3e0ff;
	color: var(--d24c-accent-dark);
	transition: background 0.2s, color 0.2s;
}

.d24c-tipbar__icon > span {
	grid-area: 1 / 1;
	display: none;
}

.d24c-tipbar__icon svg {
	display: block;
	width: 21px;
	height: 21px;
}

.d24c-tipbar__icon .ic-tooth svg {
	width: 15px;
	height: auto;
}

.d24c-tipbar[data-state="idle"] .ic-tooth,
.d24c-tipbar[data-state="partial"] .ic-tooth,
.d24c-tipbar[data-state="over"] .ic-tooth,
.d24c-tipbar[data-state="done"] .ic-check {
	display: block;
}

/* Pressing Save while the teeth are missing flashes the banner. */
.d24c-tipbar.is-attn {
	animation: d24c-attn 0.9s ease 2;
}

@keyframes d24c-attn {
	0%,
	100% {
		box-shadow: 0 0 0 0 rgba(47, 107, 255, 0);
	}
	50% {
		box-shadow: 0 0 0 6px rgba(47, 107, 255, 0.28);
	}
}

/* "Clear teeth" is a real button, so it cannot be mistaken for a way to dismiss the message. */
.d24c-tipbar .d24c-link {
	flex: none;
	padding: 6px 11px;
	border: 1px solid #b9c9f5;
	border-radius: 8px;
	background: #fff;
	text-decoration: none;
}

.d24c-tipbar .d24c-link:hover {
	background: var(--d24c-accent-soft);
	text-decoration: none;
}

.d24c-tipbar__text {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 1px;
}

.d24c-tipbar__text strong {
	font-size: 14.5px;
	font-weight: 700;
	line-height: 1.3;
	color: var(--d24c-text);
}

.d24c-tipbar__text span {
	font-size: 12.5px;
	line-height: 1.35;
	color: var(--d24c-muted);
}

.d24c-tipbar[data-state="done"] {
	background: #e6f6ef;
	border-color: #b6e3d0;
}

.d24c-tipbar[data-state="done"] .d24c-tipbar__icon {
	background: #c4e8d6;
	color: var(--d24c-ok-text);
}

.d24c-tipbar[data-state="done"] strong {
	color: var(--d24c-ok-text);
}

.d24c-tipbar[data-state="done"].is-attn {
	animation-name: d24c-attn-ok;
}

/* More teeth are selected than the quantity (it was lowered after the case was saved): amber, with what to do. */
.d24c-tipbar[data-state="over"] {
	background: #fff4e0;
	border-color: #f0d9a8;
}

.d24c-tipbar[data-state="over"] .d24c-tipbar__icon {
	background: #ffe3b0;
	color: #8a5200;
}

.d24c-tipbar[data-state="over"] strong {
	color: #7a4300;
}

@keyframes d24c-attn-ok {
	0%,
	100% {
		box-shadow: 0 0 0 0 rgba(20, 153, 106, 0);
	}
	50% {
		box-shadow: 0 0 0 6px rgba(20, 153, 106, 0.28);
	}
}

.d24c-link {
	all: unset;
	box-sizing: border-box;
	font-size: 13px;
	font-weight: 600;
	color: var(--d24c-accent-dark);
	cursor: pointer;
	border-radius: 6px;
	padding: 2px 4px;
}

.d24c-link:hover {
	text-decoration: underline;
}

.d24c-link:focus-visible {
	outline: 2px solid var(--d24c-accent);
}

.d24c-link[disabled] {
	color: #a9b3c4;
	cursor: not-allowed;
	text-decoration: none;
}

.d24c-chart {
	direction: ltr;
	padding: 12px 12px 14px;
	border-radius: 16px;
	/* A slightly deeper panel makes the white tooth cards stand out as separate buttons. */
	background: #e9eef7;
	border: 1px solid #cfd8e8;
}

.d24c-sides {
	display: flex;
	justify-content: space-between;
	margin: 0 0 4px;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--d24c-label);
}

/* The notation is always shown: a dentist used to Universal or Palmer numbers must see that these are FDI. */
.d24c-sides .d24c-fdi {
	color: var(--d24c-text);
}

.d24c-arch {
	position: relative;
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0 16px;
}

.d24c-arch::before,
.d24c-arch::after {
	content: "";
	position: absolute;
	pointer-events: none;
}

.d24c-arch::before {
	inset-block: 0;
	left: 50%;
	border-left: 1px dashed #cdd6e5;
}

.d24c-arch::after {
	inset-inline: 0;
	top: 50%;
	border-top: 1px dashed #cdd6e5;
}

.d24c-quad {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.d24c-quad.is-lower {
	flex-direction: column-reverse;
}

.d24c-quad__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 6px;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: 0.07em;
	text-transform: uppercase;
	color: var(--d24c-label);
}

.d24c-quad__head .d24c-link {
	font-size: 12px;
	letter-spacing: 0;
	text-transform: none;
	padding: 3px 6px;
}

.d24c-row {
	display: flex;
	gap: 3px;
}

/* The arch curve lifts the molars outwards, so only the outer side needs room. */
.d24c-quad.is-upper .d24c-row {
	padding-block: 16px 2px;
}

.d24c-quad.is-lower .d24c-row {
	padding-block: 2px 16px;
}

/* Every tooth is a white "card" with a numbered ring, so it reads as something to press. */
.d24c-tooth {
	all: unset;
	box-sizing: border-box;
	position: relative;
	flex: var(--w) 1 0%;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	padding: 8px 2px 7px;
	border: 1px solid #a9b8d0;
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 2px 3px rgba(18, 33, 58, 0.12);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transform: translateY(calc(var(--i) * var(--d24c-curve) * -1));
	transition: border-color 0.15s, background 0.15s, box-shadow 0.15s;
}

.d24c-quad.is-lower .d24c-tooth {
	flex-direction: column-reverse;
	transform: translateY(calc(var(--i) * var(--d24c-curve)));
}

.d24c-tooth:focus-visible {
	outline: 2px solid var(--d24c-accent);
	outline-offset: 1px;
}

.d24c-shape {
	display: block;
	width: 100%;
	transition: transform 0.15s;
}

.d24c-shape svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

.d24c-quad.is-lower .d24c-shape svg {
	transform: scaleY(-1);
}

.d24c-crown {
	fill: var(--d24c-crown);
	stroke: var(--d24c-stroke);
	stroke-width: 1.5;
	stroke-linejoin: round;
	transition: fill 0.15s, stroke 0.15s;
}

.d24c-rootp {
	fill: var(--d24c-root-fill);
	stroke: #c9b588;
	stroke-width: 1.3;
	stroke-linejoin: round;
	transition: fill 0.15s, stroke 0.15s;
}

.d24c-line {
	fill: none;
	stroke: #cdd5e3;
	stroke-width: 1.2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: stroke 0.15s;
}

/* The FDI number sits in a ring, like an empty checkbox. */
.d24c-num {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 26px;
	height: 26px;
	padding: 0 5px;
	border: 1.5px solid #a9b6cf;
	border-radius: 999px;
	background: #fff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	font-variant-numeric: tabular-nums;
	color: #55627a;
	transition: background 0.15s, border-color 0.15s, color 0.15s;
}

@media (hover: hover) {
	.d24c-tooth:hover {
		z-index: 6;
		border-color: var(--d24c-accent);
		box-shadow: 0 8px 16px rgba(47, 107, 255, 0.2);
	}

	.d24c-tooth:hover .d24c-shape {
		transform: translateY(-2px) scale(1.06);
	}

	.d24c-tooth:hover .d24c-crown {
		fill: var(--d24c-accent-soft);
		stroke: var(--d24c-accent);
	}

	.d24c-tooth:hover .d24c-num {
		border-color: var(--d24c-accent);
		color: var(--d24c-accent-dark);
	}

	.d24c-tooth:hover .d24c-tooltip {
		display: block;
	}
}

.d24c-tooth:focus-visible {
	z-index: 6;
}

.d24c-tooth:focus-visible .d24c-tooltip {
	display: block;
}

.d24c-tooth[aria-checked="true"] {
	border-color: var(--d24c-accent);
	background: var(--d24c-accent-soft);
	box-shadow: 0 0 0 2px rgba(47, 107, 255, 0.2);
}

.d24c-tooth[aria-checked="true"] .d24c-crown {
	fill: var(--d24c-accent);
	stroke: var(--d24c-accent-dark);
}

.d24c-tooth[aria-checked="true"] .d24c-rootp {
	fill: #cfdcff;
	stroke: #a9bff5;
}

.d24c-tooth[aria-checked="true"] .d24c-line {
	stroke: rgba(255, 255, 255, 0.55);
}

.d24c-tooth[aria-checked="true"] .d24c-num {
	border-color: var(--d24c-accent);
	background: var(--d24c-accent);
	color: var(--d24c-ink);
}

/* All teeth chosen: the rest are dimmed and cannot be pressed until one is removed. */
.d24c-tooth[aria-disabled="true"]:not([aria-checked="true"]) {
	cursor: not-allowed;
	box-shadow: none;
}

.d24c-tooth[aria-disabled="true"]:not([aria-checked="true"]) .d24c-shape {
	opacity: 0.5;
}

.d24c-tooth[aria-disabled="true"]:not([aria-checked="true"]) .d24c-num {
	opacity: 0.6;
}

@media (hover: hover) {
	.d24c-tooth[aria-disabled="true"]:not([aria-checked="true"]):hover {
		border-color: #a9b8d0;
		box-shadow: none;
	}

	.d24c-tooth[aria-disabled="true"]:not([aria-checked="true"]):hover .d24c-shape {
		transform: none;
	}

	.d24c-tooth[aria-disabled="true"]:not([aria-checked="true"]):hover .d24c-crown {
		fill: var(--d24c-crown);
		stroke: var(--d24c-stroke);
	}

	.d24c-tooth[aria-disabled="true"]:not([aria-checked="true"]):hover .d24c-num {
		border-color: #a9b6cf;
		color: #55627a;
	}
}

.d24c-tooth.is-pop .d24c-shape {
	animation: d24c-pop 0.28s ease;
}

.d24c-tooth.is-nope .d24c-shape {
	animation: d24c-nope 0.32s ease;
}

@keyframes d24c-nope {
	0%,
	100% {
		transform: translateX(0);
	}
	25% {
		transform: translateX(-4px);
	}
	50% {
		transform: translateX(4px);
	}
	75% {
		transform: translateX(-2px);
	}
}

/* Hover and focus label: "Select 16" / "Remove 16". Hidden on touch screens. */
.d24c-tooltip {
	position: absolute;
	z-index: 8;
	left: 50%;
	bottom: calc(100% + 9px);
	display: none;
	width: max-content;
	max-width: 160px;
	padding: 7px 10px 8px;
	border-radius: 9px;
	background: #12213a;
	color: #fff;
	text-align: center;
	font-size: 12px;
	line-height: 1.3;
	pointer-events: none;
	transform: translateX(-50%);
	box-shadow: 0 8px 22px rgba(10, 20, 40, 0.32);
}

.d24c-tooltip::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	margin-left: -5px;
	border: 5px solid transparent;
	border-top-color: #12213a;
}

.d24c-tooltip b {
	display: block;
	font-size: 12.5px;
	font-weight: 700;
}

.d24c-tooltip small {
	display: block;
	margin-top: 1px;
	font-size: 11px;
	font-weight: 400;
	opacity: 0.75;
}

.d24c-tooltip .tt-rem,
.d24c-tooltip .tt-full {
	display: none;
}

.d24c-tooth[aria-checked="true"] .tt-sel,
.d24c-tooth[aria-disabled="true"]:not([aria-checked="true"]) .tt-sel {
	display: none;
}

.d24c-tooth[aria-checked="true"] .tt-rem,
.d24c-tooth[aria-disabled="true"]:not([aria-checked="true"]) .tt-full {
	display: block;
}

.d24c-quad.is-lower .d24c-tooltip {
	top: calc(100% + 9px);
	bottom: auto;
}

.d24c-quad.is-lower .d24c-tooltip::after {
	top: auto;
	bottom: 100%;
	border-top-color: transparent;
	border-bottom-color: #12213a;
}

/* Teeth at the ends of a row anchor their label inwards so it stays inside the drawer. */
.d24c-tooth.tip-start .d24c-tooltip {
	left: 0;
	transform: none;
}

.d24c-tooth.tip-start .d24c-tooltip::after {
	left: 14px;
	margin-left: 0;
}

.d24c-tooth.tip-end .d24c-tooltip {
	right: 0;
	left: auto;
	transform: none;
}

.d24c-tooth.tip-end .d24c-tooltip::after {
	right: 14px;
	left: auto;
	margin-left: 0;
}

/* Animated "tap here" hint: a hand taps one tooth until the user selects or hovers a tooth. */
.d24c-hand {
	position: absolute;
	z-index: 7;
	left: calc(50% - 10.7px);
	top: calc(50% - 2.7px);
	width: 32px;
	height: 32px;
	pointer-events: none;
	opacity: 0;
	filter: drop-shadow(0 3px 4px rgba(10, 20, 40, 0.3));
	/* Three taps, then it stays away for good: a hint, not a decoration. */
	animation: d24c-tap 3.4s ease-in-out 0.4s 3 both;
}

.d24c-hand svg {
	display: block;
	width: 100%;
	height: 100%;
	overflow: visible;
}

.d24c-hand__body {
	fill: #fff;
	stroke: #12213a;
	stroke-width: 1.5;
}

.d24c-hand__lines {
	fill: none;
	stroke: #12213a;
	stroke-width: 1.5;
}

.d24c-ripple {
	position: absolute;
	left: 0.7px;
	top: -7.3px;
	width: 20px;
	height: 20px;
	border: 3px solid var(--d24c-accent);
	border-radius: 50%;
	opacity: 0;
	animation: d24c-ripple 3.4s ease-out 0.4s 3 both;
}

/* The tooth the hand taps answers the tap with the same blue highlight a real press gets. */
.d24c-chart:not(.has-sel):not(.is-aware) .d24c-tooth[data-fdi="16"] {
	animation: d24c-demo-press 3.4s ease-in-out 0.4s 3 both;
}

@keyframes d24c-demo-press {
	0%,
	24%,
	62%,
	100% {
		border-color: #a9b8d0;
		box-shadow: 0 2px 3px rgba(18, 33, 58, 0.12);
		background: #fff;
	}
	28%,
	50% {
		border-color: var(--d24c-accent);
		box-shadow: 0 8px 16px rgba(47, 107, 255, 0.22);
		background: var(--d24c-accent-soft);
	}
}

.d24c-chart.has-sel .d24c-hand,
.d24c-chart.is-aware .d24c-hand {
	display: none;
}

@keyframes d24c-tap {
	0% {
		opacity: 0;
		transform: translate(22px, 26px) scale(1);
	}
	14% {
		opacity: 1;
		transform: translate(0, 0) scale(1);
	}
	26% {
		opacity: 1;
		transform: translate(-1px, 1px) scale(0.86);
	}
	34% {
		opacity: 1;
		transform: translate(0, 0) scale(1);
	}
	62% {
		opacity: 1;
		transform: translate(0, 0) scale(1);
	}
	78%,
	100% {
		opacity: 0;
		transform: translate(22px, 26px) scale(1);
	}
}

@keyframes d24c-ripple {
	0%,
	25% {
		opacity: 0;
		transform: scale(0.4);
	}
	27% {
		opacity: 0.9;
		transform: scale(0.6);
	}
	52%,
	100% {
		opacity: 0;
		transform: scale(2.8);
	}
}

@keyframes d24c-pop {
	0% {
		transform: scale(0.9);
	}
	55% {
		transform: scale(1.08);
	}
	100% {
		transform: scale(1);
	}
}

/* chips of the chosen teeth */

.d24c-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 12px 0 0;
	padding: 0;
	list-style: none;
}

.d24c-chips:empty {
	display: none;
}

.d24c-chip {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-height: 34px;
	padding: 0 10px 0 13px;
	border-radius: 999px;
	background: var(--d24c-accent-soft);
	color: var(--d24c-accent-dark);
	font-size: 14px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	cursor: pointer;
	transition: background 0.15s;
}

.d24c-chip:hover {
	background: #d6e2ff;
}

.d24c-chip:focus-visible {
	outline: 2px solid var(--d24c-accent);
	outline-offset: 1px;
}

.d24c-chip svg {
	width: 16px;
	height: 16px;
	opacity: 0.75;
}

/* ---------- shade picker ---------- */

.d24c-shades {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 10px;
}

.d24c-shade {
	all: unset;
	box-sizing: border-box;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 5px 10px 5px 6px;
	border-radius: 999px;
	border: 1px solid var(--d24c-field-border);
	background: #fff;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--d24c-text);
	cursor: pointer;
	transition: border-color 0.15s, background 0.15s;
}

.d24c-shade:hover {
	border-color: var(--d24c-accent);
}

.d24c-shade:focus-visible {
	outline: 2px solid var(--d24c-accent);
	outline-offset: 1px;
}

.d24c-shade[aria-pressed="true"] {
	border-color: var(--d24c-accent);
	background: var(--d24c-accent-soft);
	color: var(--d24c-accent-dark);
}

.d24c-shade i {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	background: var(--sw);
	box-shadow: inset 0 0 0 1px rgba(18, 33, 58, 0.14);
}

/* ---------- files ---------- */

.d24c-files > summary {
	list-style: none;
	cursor: pointer;
}

.d24c-files > summary::-webkit-details-marker {
	display: none;
}

.d24c-files > summary .d24c-sec__title::after {
	content: "";
	width: 8px;
	height: 8px;
	margin-inline-start: auto;
	border-right: 2px solid var(--d24c-muted);
	border-bottom: 2px solid var(--d24c-muted);
	transform: rotate(45deg);
	transition: transform 0.2s;
}

.d24c-files[open] > summary .d24c-sec__title::after {
	transform: rotate(225deg);
}

.d24c-files > summary .d24c-sec__title {
	margin: 0;
	align-items: center;
}

.d24c-files .d24c-sec__sub {
	margin-inline-start: 0;
}

.d24c-drop {
	margin-top: 12px;
	padding: 22px 16px;
	border: 1.5px dashed #c3cde0;
	border-radius: 14px;
	background: var(--d24c-surface);
	text-align: center;
	font-size: 13.5px;
	color: var(--d24c-muted);
	transition: border-color 0.15s, background 0.15s;
}

.d24c-drop.is-over {
	border-color: var(--d24c-accent);
	background: var(--d24c-accent-soft);
}

.d24c-drop small {
	display: block;
	margin-top: 4px;
	font-size: 12px;
	color: var(--d24c-label);
}

/* On touch screens there is nothing to drag onto: show a real button instead of a link. */
@media (pointer: coarse) {
	.d24c-drop__drag {
		display: none;
	}

	.d24c-drop__pick {
		display: inline-flex;
		align-items: center;
		justify-content: center;
		min-height: 44px;
		padding: 0 22px;
		border: 1.5px solid var(--d24c-accent);
		border-radius: 12px;
		background: #fff;
		font-size: 15px;
	}

	.d24c-shade {
		min-height: 36px;
		padding-block: 0;
	}
}

.d24c-filelist {
	margin: 10px 0 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.d24c-file {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 4px 10px;
	align-items: center;
	padding: 10px 12px;
	border: 1px solid var(--d24c-border);
	border-radius: 10px;
	font-size: 13px;
}

.d24c-file__name {
	min-width: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
	font-weight: 600;
}

.d24c-file__meta {
	grid-column: 1;
	font-size: 12px;
	color: var(--d24c-muted);
}

.d24c-file.is-error .d24c-file__meta {
	color: var(--d24c-danger);
}

.d24c-file .d24c-link {
	grid-row: 1 / span 2;
	grid-column: 2;
	color: var(--d24c-muted);
}

.d24c-bar {
	grid-column: 1 / -1;
	height: 4px;
	border-radius: 4px;
	background: var(--d24c-surface);
	overflow: hidden;
}

.d24c-bar span {
	display: block;
	height: 100%;
	width: var(--p, 0%);
	background: var(--d24c-accent);
	transition: width 0.15s linear;
}

/* ---------- footer ---------- */

.d24c-foot {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	padding: 14px 20px calc(14px + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--d24c-border);
	background: var(--d24c-bg);
	box-shadow: 0 -8px 20px rgba(18, 33, 58, 0.05);
}

.d24c-hint {
	margin: 0;
	min-width: 0;
	font-size: 13.5px;
	line-height: 1.5;
	color: #44526a;
}

.d24c-hint.is-ready {
	color: var(--d24c-ok-text);
	font-weight: 600;
}

/* Each missing item is a link: it scrolls to the field and puts the cursor there. */
.d24c-need {
	all: unset;
	box-sizing: border-box;
	font-weight: 700;
	color: var(--d24c-accent-dark);
	text-decoration: underline;
	text-underline-offset: 2px;
	cursor: pointer;
	border-radius: 4px;
}

.d24c-need:hover {
	text-decoration-thickness: 2px;
}

.d24c-need:focus-visible {
	outline: 2px solid var(--d24c-accent);
	outline-offset: 2px;
}

.d24c-btn {
	all: unset;
	box-sizing: border-box;
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 150px;
	height: 46px;
	padding: 0 22px;
	border: 1px solid transparent;
	border-radius: 12px;
	font-size: 15px;
	font-weight: 700;
	cursor: pointer;
	transition: background 0.15s, box-shadow 0.15s, opacity 0.15s;
}

.d24c-btn--primary {
	background: var(--d24c-accent);
	color: var(--d24c-ink);
	box-shadow: 0 6px 16px rgba(47, 107, 255, 0.32);
}

.d24c-btn--primary:hover {
	background: var(--d24c-accent-dark);
}

.d24c-btn:focus-visible {
	outline: 2px solid var(--d24c-accent);
	outline-offset: 2px;
}

/* Save is never really disabled: while something is missing it only looks inactive, and pressing it
   shows what is missing and takes the user there. */
.d24c-btn[aria-disabled="true"] {
	background: #d5dbe6;
	color: #4e5b72;
	box-shadow: none;
}

.d24c-btn[aria-disabled="true"]:hover {
	background: #cbd3e1;
}

.d24c-btn.is-busy,
.d24c-btn.is-busy:hover {
	background: var(--d24c-accent);
	color: var(--d24c-ink);
	box-shadow: 0 6px 16px rgba(47, 107, 255, 0.32);
	opacity: 0.85;
	cursor: progress;
}

.d24c-spin {
	width: 16px;
	height: 16px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	animation: d24c-spin 0.7s linear infinite;
}

@keyframes d24c-spin {
	to {
		transform: rotate(360deg);
	}
}

.d24c-fatal {
	margin: 0 0 12px;
	padding: 10px 12px;
	border-radius: 10px;
	background: #fdecec;
	color: #b42323;
	font-size: 13px;
}

.d24c-fatal:empty {
	display: none;
}

/* ---------- toast: shown when the drawer could not even be opened ---------- */

.d24c-toast {
	position: fixed;
	inset-inline: 16px;
	bottom: 24px;
	z-index: 999995;
	max-width: 420px;
	margin-inline: auto;
	padding: 12px 16px;
	border-radius: 12px;
	background: #12213a;
	color: #fff;
	font-size: 14px;
	line-height: 1.4;
	text-align: center;
	box-shadow: 0 12px 30px rgba(10, 20, 40, 0.35);
	opacity: 0;
	pointer-events: none;
	transform: translateY(8px);
	transition: opacity 0.2s, transform 0.2s;
}

.d24c-toast.is-on {
	opacity: 1;
	transform: none;
}

/* ---------- "complete your cases" bar on the cart and checkout pages ---------- */

.d24c-resume {
	position: fixed;
	inset-inline: 12px;
	bottom: 16px;
	z-index: 99990;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	max-width: 640px;
	margin-inline: auto;
	padding: 12px 14px 12px 16px;
	border-radius: 14px;
	background: #12213a;
	color: #fff;
	font-size: 14px;
	line-height: 1.4;
	box-shadow: 0 12px 30px rgba(10, 20, 40, 0.35);
}

.d24c-resume button {
	flex: none;
	min-height: 40px;
	padding: 0 18px;
	border: 0;
	border-radius: 10px;
	background: #2c66f2;
	color: #fff;
	font: inherit;
	font-weight: 700;
	cursor: pointer;
}

.d24c-resume button:hover {
	background: #1d4fd8;
}

/* ---------- cart line badge (rendered by the server) ---------- */

.d24-case-line {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-top: 6px;
	font-size: 13px;
}

.d24-case-line__state {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 3px 10px;
	border-radius: 999px;
	font-weight: 600;
	background: #fff4e0;
	color: #a35f00;
}

.d24-case-line.is-complete .d24-case-line__state {
	background: #e6f6ef;
	color: #0c6e4c;
}

.d24-case-line__edit {
	padding: 0;
	border: 0;
	background: none;
	font: inherit;
	font-weight: 600;
	color: #1d4fd8;
	text-decoration: underline;
	cursor: pointer;
}

/* ---------- touch screens and small screens: stacked quadrants ---------- */

/* Phones, and tablets used with a finger: every quadrant is its own row of eight, so every tooth is a big target. */
@media (max-width: 720px), (pointer: coarse) {
	.d24c-root {
		--d24c-curve: 0px;
	}

	.d24c-arch {
		grid-template-columns: minmax(0, 1fr);
		gap: 4px;
	}

	.d24c-arch::before,
	.d24c-arch::after {
		display: none;
	}

	.d24c-quad.is-upper .d24c-row,
	.d24c-quad.is-lower .d24c-row {
		padding-block: 6px;
	}

	.d24c-quad,
	.d24c-quad.is-lower {
		flex-direction: column;
		padding: 8px 0;
		border-bottom: 1px solid #e3e8f1;
	}

	.d24c-quad:last-child {
		border-bottom: 0;
	}

	/* The captions assume two columns side by side; the numbering note is still worth showing. */
	.d24c-sides {
		justify-content: center;
	}

	.d24c-sides span:not(.d24c-fdi) {
		display: none;
	}

	/* Wider hit areas: every tooth in a row gets the same width and the drawing keeps its proportions inside it. */
	.d24c-chart {
		padding: 10px 8px 12px;
	}

	.d24c-row {
		gap: 2px;
	}

	.d24c-tooth {
		flex: 1 1 0%;
	}

	.d24c-shape {
		width: calc(var(--w) / 44 * 100%);
	}
}

/* Small screens: the drawer becomes a full-width bottom sheet. */
@media (max-width: 720px) {
	.d24c-drawer {
		inset-block: auto 0;
		inset-inline: 0;
		width: 100%;
		height: 94vh;
		height: 94dvh;
		border-radius: 20px 20px 0 0;
		transform: translateY(100%);
		box-shadow: 0 -12px 40px rgba(10, 20, 40, 0.25);
	}

	.d24c-root[dir="rtl"] .d24c-drawer {
		box-shadow: 0 -12px 40px rgba(10, 20, 40, 0.25);
	}

	/* The sheet does not clip its children, so the header carries the rounded corners itself. */
	.d24c-head {
		padding: 14px 16px;
		border-radius: 20px 20px 0 0;
	}

	.d24c-body {
		padding-inline: 16px;
	}

	.d24c-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.d24c-foot {
		flex-direction: column-reverse;
		align-items: stretch;
		gap: 8px;
		padding-inline: 16px;
	}

	.d24c-hint {
		text-align: center;
	}

	.d24c-btn {
		width: 100%;
	}

	.d24c-tipbar {
		padding: 10px 12px;
	}
}

/* Narrow phones: give the teeth every spare pixel (40px and more at 360px). */
@media (max-width: 400px) {
	.d24c-body {
		padding-inline: 12px;
	}

	.d24c-chart {
		padding: 10px 4px 12px;
	}

	.d24c-row {
		gap: 1px;
	}
}

/* Very narrow phones: the product name needs the room more than the unit word and the thumbnail do. */
@media (max-width: 360px) {
	.d24c-count [data-count-w] {
		display: none;
	}
}

@media (max-width: 340px) {
	.d24c-prod__img {
		display: none;
	}
}

/* The banner keeps one height while its text changes, so the chart below it never jumps. */
@media (max-width: 380px) {
	.d24c-tipbar {
		min-height: 98px;
	}
}

@media (max-width: 340px) {
	.d24c-tipbar {
		min-height: 130px;
	}
}

/* Letter spacing and capitals are made for Latin labels: they break the joined letters of Arabic. */
.d24c-root[dir="rtl"] .d24c-eyebrow,
.d24c-root[dir="rtl"] .d24c-sides,
.d24c-root[dir="rtl"] .d24c-quad__head {
	letter-spacing: 0;
	text-transform: none;
}

/* Windows high contrast replaces colours with the system palette, so rings and borders must carry the states. */
@media (forced-colors: active) {
	.d24c-btn[aria-disabled="true"] {
		color: GrayText;
		border-color: GrayText;
	}

	.d24c-shade[aria-pressed="true"],
	.d24c-tooth[aria-checked="true"],
	.d24c-seg input:checked + span {
		outline: 2px solid Highlight;
	}
}

@media (prefers-reduced-motion: reduce) {
	.d24c-drawer,
	.d24c-overlay,
	.d24c-tooth.is-pop .d24c-shape,
	.d24c-tooth.is-nope .d24c-shape,
	.d24c-tipbar,
	.d24c-tipbar__icon,
	.d24c-toast {
		transition: none;
		animation: none;
	}

	/* The banner pulse and the demo press on tooth 16 are animations too. */
	.d24c-tipbar.is-attn,
	.d24c-chart:not(.has-sel):not(.is-aware) .d24c-tooth[data-fdi="16"] {
		animation: none;
	}

	.d24c-tooth:hover .d24c-shape,
	.d24c-toast {
		transform: none;
	}

	/* Keep the hint visible, but still. */
	.d24c-hand {
		animation: none;
		opacity: 1;
	}

	.d24c-ripple {
		display: none;
	}
}
