/* Clinic blocks. Colours come from the theme palette, with fallbacks for other themes. */
:root {
	--htcb-paper: var(--wp--preset--color--paper, #f2f5f3);
	--htcb-white: var(--wp--preset--color--white, #fff);
	--htcb-ink: var(--wp--preset--color--ink, #10211f);
	--htcb-drape: var(--wp--preset--color--drape, #0e3b39);
	--htcb-mist: var(--wp--preset--color--mist, #d5e1dc);
	--htcb-marker: var(--wp--preset--color--marker, #5b34d1);
	--htcb-slate: var(--wp--preset--color--slate, #48605c);
	--htcb-head: var(--wp--preset--font-family--heading, inherit);
}

.htcb-btn,
.htcb-form button[type="submit"] {
	display: inline-block;
	padding: 0.85em 1.4em;
	border: 0;
	border-radius: 4px;
	background: var(--htcb-marker);
	color: #fff;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background 0.15s;
}
.htcb-btn:hover { background: var(--htcb-drape); color: #fff; }
.htcb-btn[disabled] { opacity: 0.6; cursor: wait; }

/* Planner */
.htcb-planner__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.htcb-planner {
	container-type: inline-size;
	background: var(--htcb-white);
	border: 1px solid var(--htcb-mist);
	border-radius: 6px;
	color: var(--htcb-ink);
	overflow: hidden;
}
.htcb-planner__map { display: flex; flex-direction: column; align-items: center; justify-content: center; position: relative; padding: 1rem 1rem 0.75rem; background: #e6eeea; text-align: center; }
.htcb-planner__map svg { display: block; width: 100%; max-width: 420px; height: auto; margin: 0 auto; }
.htcb-head { fill: #f7e6da; stroke: #cbb2a1; stroke-width: 1.5; }
.htcb-ear, .htcb-nose { fill: #f0d9ca; stroke: #cbb2a1; stroke-width: 1.5; }
.htcb-hair line {
	stroke: #2b211c;
	stroke-width: 2.1;
	stroke-linecap: round;
	stroke-dasharray: 1;
	stroke-dashoffset: 0;
	transition: stroke-dashoffset 0.5s ease-out, stroke 0.3s, opacity 0.3s;
}
.htcb-hair line.is-lost { stroke-dashoffset: 1; opacity: 0; transition-delay: 0s !important; }
.htcb-hair line.is-graft { stroke: var(--htcb-marker); stroke-width: 2.3; }
.htcb-line { stroke: var(--htcb-marker); stroke-width: 2.2; stroke-dasharray: 7 6; stroke-linecap: round; transition: opacity 0.4s; }
.htcb-planner[data-view="now"] .htcb-line { opacity: 0; }
.htcb-maplabel { font: 500 13px var(--wp--preset--font-family--body, sans-serif); fill: var(--htcb-slate); }
.htcb-planner__toggle { display: inline-flex; margin-top: 0.5rem; border: 1px solid var(--htcb-drape); border-radius: 4px; overflow: hidden; }
.htcb-planner__toggle[hidden] { display: inline-flex; visibility: hidden; }
.htcb-planner__toggle button { padding: 0.5em 1em; min-height: 44px; border: 0; background: transparent; color: var(--htcb-drape); font: inherit; font-size: 0.9rem; font-weight: 500; cursor: pointer; }
.htcb-planner__toggle button[aria-pressed="true"] { background: var(--htcb-drape); color: #fff; }
.htcb-planner__panel { display: flex; flex-direction: column; padding: clamp(1.25rem, 2.5vw, 2rem); }
.htcb-planner fieldset { margin: 0; padding: 0; border: 0; min-width: 0; }
.htcb-planner legend { padding: 0; margin-bottom: 0.75rem; font-weight: 600; }
.htcb-planner__stages { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.htcb-stage { position: relative; display: block; }
.htcb-stage input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.htcb-stage span { display: flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 0.25rem; border: 1px solid var(--htcb-mist); border-radius: 4px; font-size: 0.9rem; font-weight: 500; }
.htcb-stage input:hover + span { border-color: var(--htcb-marker); }
.htcb-stage input:checked + span { background: var(--htcb-marker); border-color: var(--htcb-marker); color: #fff; }
.htcb-stage input:focus-visible + span { outline: 3px solid var(--htcb-marker); outline-offset: 2px; }
.htcb-planner__out { flex: 1; min-height: 13rem; padding: 1.25rem 0; }
.htcb-planner__out p { margin: 0; }
.htcb-planner__num { margin: 0.35rem 0 0.5rem !important; font-size: 1.05rem; font-weight: 500; }
.htcb-planner__num strong { font-family: var(--htcb-head); font-size: clamp(1.7rem, 2.6vw, 2.35rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.1; white-space: nowrap; font-variant-numeric: tabular-nums; }
.htcb-planner__num strong.is-text { font-size: 1.7rem; }
.htcb-planner__note { color: var(--htcb-slate); font-size: 0.95rem; line-height: 1.5; }
.htcb-planner__panel > .htcb-btn { text-align: center; }
@container (max-width: 560px) {
	.htcb-planner__in { grid-template-columns: minmax(0, 1fr); }
	.htcb-planner__map svg { max-width: 260px; }
	.htcb-planner__out { min-height: 11rem; }
}

/* Form */
.htcb-form { padding: clamp(1.25rem, 3vw, 2.25rem); border: 1px solid var(--htcb-mist); border-radius: 6px; background: var(--htcb-white); color: var(--htcb-ink); scroll-margin-top: 6rem; }
.htcb-form p { margin: 0 0 1.1rem; }
.htcb-form__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1.1rem; }
.htcb-form label { display: block; margin-bottom: 0.3rem; font-size: 0.95rem; font-weight: 500; }
.htcb-form label em { color: var(--htcb-slate); font-style: normal; font-weight: 400; }
.htcb-form input:not([type="checkbox"]):not([type="hidden"]),
.htcb-form select,
.htcb-form textarea { box-sizing: border-box; width: 100%; min-height: 48px; padding: 0.6rem 0.75rem; border: 1px solid #7f948f; border-radius: 4px; background: #fff; color: inherit; font: inherit; font-size: 1rem; }
.htcb-form :is(input, select, textarea):focus-visible { outline: 3px solid var(--htcb-marker); outline-offset: 1px; border-color: var(--htcb-marker); }
.htcb-form__hint { display: block; margin-top: 0.3rem; color: var(--htcb-slate); font-size: 0.9rem; }
.htcb-form__consent { display: grid; grid-template-columns: 24px 1fr; gap: 0.6rem; align-items: start; }
.htcb-form__consent input { width: 22px; height: 22px; margin: 0.1rem 0 0; accent-color: var(--htcb-marker); }
.htcb-form__consent label { margin: 0; font-weight: 400; }
.htcb-form a { color: var(--htcb-marker); }
.htcb-form__status { margin: 1rem 0 0 !important; font-weight: 600; color: var(--htcb-drape); }
.htcb-form__status:empty { display: none; }
.htcb-form__status.is-error { color: #a3172b; }
.htcb-form__status:focus { outline: none; }
.htcb-form__estimate { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.75rem; margin-bottom: 1.1rem; padding: 0.6rem 0.8rem; border-left: 3px solid var(--htcb-marker); background: #efeafd; font-size: 0.95rem; }
.htcb-form__estimate[hidden] { display: none; }
.htcb-form__estimate button { padding: 0.5em 0; border: 0; background: none; color: var(--htcb-marker); font: inherit; text-decoration: underline; cursor: pointer; }
.htcb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 560px) {
	.htcb-form__grid { grid-template-columns: minmax(0, 1fr); }
	.htcb-form button[type="submit"] { width: 100%; }
}

/* Contact */
.htcb-chats { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.htcb-chat { display: inline-flex; align-items: center; gap: 0.5rem; min-height: 48px; padding: 0 1.1rem; box-sizing: border-box; border-radius: 4px; background: var(--htcb-white); color: var(--htcb-drape) !important; font-weight: 600; text-decoration: none; border: 1px solid var(--htcb-drape); }
.htcb-chat:hover { background: var(--htcb-drape); color: #fff !important; }
.htcb-float { position: fixed; right: 1rem; bottom: 1rem; z-index: 90; display: flex; gap: 0.5rem; }
.htcb-float .htcb-chat { box-shadow: 0 4px 16px rgba(16, 33, 31, 0.18); }
@media (max-width: 560px) {
	.htcb-float { right: 0; bottom: 0; left: 0; gap: 0; border-top: 1px solid var(--htcb-drape); }
	.htcb-float .htcb-chat { flex: 1; justify-content: center; min-height: 52px; border: 0; border-radius: 0; box-shadow: none; }
	.htcb-float .htcb-chat + .htcb-chat { border-left: 1px solid var(--htcb-mist); }
	body:has(.htcb-float) { padding-bottom: 53px; }
}
.htcb-contact { margin: 0; }
.htcb-contact > div { padding: 0.8rem 0; border-top: 1px solid currentColor; border-top-color: color-mix(in srgb, currentColor 22%, transparent); }
.htcb-contact dt { font-size: 0.9rem; opacity: 0.75; }
.htcb-contact dd { margin: 0; font-weight: 500; }
.htcb-copyright { margin: 0; }
.htcb-hint { padding: 0.75rem 1rem; border: 1px dashed var(--htcb-slate); color: var(--htcb-slate); font-size: 0.95rem; }

/* Breadcrumbs */
.htcb-crumbs ol { display: flex; flex-wrap: wrap; gap: 0 0.5rem; margin: 0 0 0.75rem; padding: 0; list-style: none; font-size: 0.95rem; color: var(--htcb-slate); }
.htcb-crumbs li { display: flex; align-items: center; min-height: 28px; }
.htcb-crumbs li + li::before { content: ""; width: 6px; height: 6px; margin: 0 0.65rem 0 0.15rem; border: solid currentColor; border-width: 1.5px 1.5px 0 0; transform: rotate(45deg); }
.htcb-crumbs a { color: var(--htcb-slate); text-underline-offset: 3px; }
.htcb-crumbs a:hover { color: var(--htcb-marker); }

/* Doctors and results */
.htcb-people ul { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); gap: 2rem 1.5rem; margin: 1.5rem 0 0; padding: 0; list-style: none; }
.htcb-people img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 4px; margin-bottom: 0.75rem; }
.htcb-people a { color: inherit; text-decoration: none; }
.htcb-people a:hover strong { text-decoration: underline; }
.htcb-people span { display: block; color: var(--htcb-slate); font-size: 0.95rem; }
.htcb-people__note { color: var(--htcb-slate); font-size: 0.95rem; }
.htcb-credits { padding-left: 1.1rem; }

@media (prefers-reduced-motion: reduce) {
	.htcb-hair line, .htcb-line, .htcb-btn { transition: none; }
}
