/* Tata MD Diabetes Health Check — scoped under .tdhc so it doesn't clash with the theme */
.tdhc {
	--tdhc-blue: #235D9C;
	--tdhc-sky: #4499C7;
	--tdhc-ash: #EEF3F6;
	--tdhc-ink: #161719;
	--tdhc-muted: #5B6874;
	--tdhc-line: #D8E4EC;
	--tdhc-border: #e0e8ed;
	--tdhc-input-border: #cbd8e1;
	--tdhc-red: #fff0ed;
	--tdhc-err: #b42318;
	max-width: 900px;
	margin: 28px auto;
	font-family: "DMSansRegular", Arial, Helvetica, sans-serif;
	color: var(--tdhc-ink);
	line-height: 1.5;
	text-align: left;
}

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

.tdhc-card {
	background: #fff;
	border: 1px solid var(--tdhc-border);
	border-radius: 22px;
	padding: 25px 28px 29px;
	box-shadow: 0 16px 42px rgba(25, 72, 112, 0.08);
	overflow: hidden;
	scroll-margin-top: 20px;
}

.tdhc-card-head {
	padding: 24px 28px 18px;
	border-bottom: 1px solid #edf1f4;
	margin: -25px -28px 24px -28px;
}
.tdhc-card-head h2 {
	font-size: 23px;
	color: var(--tdhc-blue);
	margin: 0 0 4px;
	letter-spacing: -0.4px;
	font-weight: 800;
	font-family: "DMSansBold", Arial, Helvetica, sans-serif;
}
.tdhc-card-head p {
	font-size: 13px;
	color: var(--tdhc-muted);
	margin: 0;
	font-family: "DMSansRegular", Arial, Helvetica, sans-serif;
}

.tdhc-card-body {
	padding: 0;
}

.tdhc h1 {
	font-size: clamp(28px, 4vw, 36px);
	line-height: 1.2;
	color: var(--tdhc-blue);
	margin: 0 0 8px;
	font-weight: 800;
	font-family: "DMSansBold", Arial, Helvetica, sans-serif;
}
.tdhc h2 {
	font-size: 23px;
	line-height: 1.25;
	color: var(--tdhc-blue);
	margin: 0 0 6px;
	font-weight: 800;
	font-family: "DMSansBold", Arial, Helvetica, sans-serif;
}
.tdhc h3 {
	font-size: 21px;
	line-height: 1.25;
	margin: 0 0 7px;
	color: var(--tdhc-ink);
	font-weight: 700;
	font-family: "DMSansBold", Arial, Helvetica, sans-serif;
}
.tdhc h3:focus { outline: none; }
.tdhc p { margin: 0 0 12px; }

.tdhc-sub {
	color: var(--tdhc-muted);
	font-size: 14px;
	margin: 0 0 20px !important;
	font-family: "DMSansRegular", Arial, Helvetica, sans-serif;
}

.tdhc-notice {
	background: var(--tdhc-ash);
	border-left: 4px solid var(--tdhc-sky);
	padding: 14px 16px;
	border-radius: 8px;
	margin: 18px 0;
}

.tdhc-progress-wrap { margin: 0 0 24px; }
.tdhc-progress-meta {
	display: flex;
	justify-content: space-between;
	color: var(--tdhc-muted);
	font-size: 11px;
	font-weight: 700;
	margin-bottom: 7px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}
.tdhc-progress {
	height: 6px;
	background: #e8f0f4;
	border-radius: 9px;
	overflow: hidden;
}
.tdhc-bar {
	height: 100%;
	background: var(--tdhc-sky);
	transition: width 0.2s ease;
}

.tdhc-field {
	margin-bottom: 17px;
}

.tdhc label, .tdhc legend {
	display: block;
	font-weight: 700;
	font-size: 14px;
	margin-bottom: 8px;
	color: var(--tdhc-ink);
	font-family: "DMSansBold", Arial, Helvetica, sans-serif;
}

.tdhc input[type=text],
.tdhc input[type=tel],
.tdhc input[type=number],
.tdhc input[type=date],
.tdhc select,
.tdhc textarea {
	width: 100%;
	max-width: 100%;
	min-height: 48px;
	border: 1px solid var(--tdhc-input-border);
	border-radius: 11px;
	padding: 12px 13px;
	font-family: "DMSansRegular", Arial, Helvetica, sans-serif;
	font-size: 16px;
	color: var(--tdhc-ink);
	background: #fff;
	box-shadow: none;
	line-height: 1.4;
	margin: 0;
	transition: border-color 0.2s ease, outline 0.2s ease;
}

.tdhc input::placeholder,
.tdhc textarea::placeholder {
	color: #8c9ba5;
	opacity: 1;
	font-size: 16px;
	font-weight: 400;
	font-family: "DMSansRegular", Arial, Helvetica, sans-serif;
}

.tdhc select {
	appearance: none;
	-webkit-appearance: none;
	background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2214%22%20height%3D%228%22%20viewBox%3D%220%200%2014%208%22%3E%3Cpath%20fill%3D%22none%22%20stroke%3D%22%235B6874%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%20d%3D%22M1%201l6%206%206-6%22%2F%3E%3C%2Fsvg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 36px;
	cursor: pointer;
}

.tdhc select:invalid,
.tdhc select option[value=""] {
	color: #8c9ba5;
}

.tdhc input:focus,
.tdhc select:focus,
.tdhc textarea:focus,
.tdhc input:focus-visible,
.tdhc select:focus-visible,
.tdhc textarea:focus-visible {
	outline: 3px solid #4499c7aa;
	outline-offset: 2px;
	border-color: var(--tdhc-blue);
}

.tdhc textarea {
	min-height: 90px;
	resize: vertical;
}

.tdhc input[type=number] {
	-moz-appearance: textfield;
}
.tdhc input[type=number]::-webkit-outer-spin-button,
.tdhc input[type=number]::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

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

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

.tdhc .tdhc-option {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 52px;
	border: 1px solid #d4e0e8;
	border-radius: 12px;
	padding: 11px 14px;
	margin: 0;
	font-weight: 500;
	font-size: 15px;
	cursor: pointer;
	background: #fff;
	font-family: "DMSansRegular", Arial, Helvetica, sans-serif;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}

.tdhc .tdhc-option:has(input:checked) {
	border-color: var(--tdhc-blue);
	background: #f0f6fa;
	color: var(--tdhc-blue);
	font-weight: 700;
}

.tdhc input[type=radio] {
	accent-color: var(--tdhc-blue);
	margin: 0;
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
	cursor: pointer;
}

.tdhc fieldset.tdhc-question {
	padding: 18px 0;
	margin: 0;
	border: 0;
	border-bottom: 1px solid var(--tdhc-line);
	min-width: 0;
}

.tdhc-qtext {
	font-weight: 700;
	font-size: 15px;
	padding: 0;
	float: left;
	width: 100%;
	font-family: "DMSansBold", Arial, Helvetica, sans-serif;
}
.tdhc-qtext + * { clear: both; }

.tdhc-details { margin-top: 14px; }

/* Consent pattern matching sample */
.tdhc .tdhc-consent {
	margin-top: 18px;
	margin-bottom: 0;
}

.tdhc .tdhc-consent-label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 12px;
	font-weight: 400;
	color: #53616c;
	line-height: 1.45;
	margin: 0;
	cursor: pointer;
	font-family: "DMSansRegular", Arial, Helvetica, sans-serif;
}

.tdhc .tdhc-consent-label input[type=checkbox] {
	margin-top: 3px;
	accent-color: var(--tdhc-blue);
	width: 16px;
	height: 16px;
	flex: 0 0 16px;
	cursor: pointer;
}

.tdhc-small {
	font-size: 12.5px;
	color: var(--tdhc-muted);
	font-weight: 400;
	font-family: "DMSansRegular", Arial, Helvetica, sans-serif;
}
.tdhc-req { color: var(--tdhc-err); }

/* Errors */
.tdhc-error {
	min-height: 18px;
	color: var(--tdhc-err);
	font-size: 13px;
	margin: 8px 0 0 !important;
	font-family: "DMSansRegular", Arial, Helvetica, sans-serif;
	font-weight: 500;
}
.tdhc-error:empty { display: none; }

.tdhc-lead-error {
	min-height: 18px;
	color: var(--tdhc-err);
	font-size: 13px;
	margin: 10px 0 0 !important;
	font-family: "DMSansRegular", Arial, Helvetica, sans-serif;
	font-weight: 500;
}
.tdhc-lead-error:empty { display: none; }

.tdhc-has-error input[type=text],
.tdhc-has-error input[type=tel],
.tdhc-has-error input[type=number],
.tdhc-has-error input[type=date],
.tdhc-has-error select,
.tdhc-has-error textarea {
	border-color: var(--tdhc-err);
}
.tdhc-has-error .tdhc-option { border-color: #e7a79e; }

.tdhc-alert {
	background: var(--tdhc-red);
	border-left: 4px solid var(--tdhc-err);
	color: #8a2a1e;
	padding: 12px 14px;
	border-radius: 8px;
	margin: 0 0 14px;
	font-weight: 700;
	font-size: 13.5px;
}

/* Actions & Buttons */
.tdhc-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 12px;
	margin-top: 22px;
	flex-wrap: wrap;
}

.tdhc button.tdhc-primary,
.tdhc button.tdhc-secondary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	border: 0;
	border-radius: 11px;
	min-height: 48px;
	padding: 12px 24px;
	font-weight: 800;
	font-size: 15px;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	letter-spacing: normal;
	box-shadow: none;
	font-family: "DMSansBold", Arial, Helvetica, sans-serif;
	transition: background-color 0.2s ease, opacity 0.2s ease;
}

.tdhc button.tdhc-primary {
	background: var(--tdhc-blue);
	color: #fff !important;
}
.tdhc button.tdhc-primary:hover,
.tdhc button.tdhc-primary:focus {
	background: #174b82;
	color: #fff !important;
}

.tdhc button.tdhc-secondary {
	background: #edf3f7;
	color: var(--tdhc-blue) !important;
}
.tdhc button.tdhc-secondary:hover,
.tdhc button.tdhc-secondary:focus {
	background: #e1eaf0;
	color: #174b82 !important;
}
.tdhc button:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.tdhc-hidden { display: none !important; }

.tdhc-pill {
	display: inline-block;
	padding: 5px 11px;
	background: var(--tdhc-ash);
	color: var(--tdhc-blue);
	border-radius: 99px;
	font-size: 11px;
	font-weight: 800;
	letter-spacing: 0.8px;
	text-transform: uppercase;
	margin-bottom: 12px;
	font-family: "DMSansBold", Arial, Helvetica, sans-serif;
}

.tdhc-summary {
	background: #f7fafc;
	border: 1px solid var(--tdhc-line);
	border-radius: 12px;
	padding: 16px;
	margin: 14px 0;
}
.tdhc-summary p:last-child { margin-bottom: 0; }
.tdhc-yes { color: #b0561d; font-weight: 700; }

.tdhc-flag {
	border-left: 4px solid #d68a35;
	background: #fff8ec;
	padding: 12px 14px;
	border-radius: 8px;
	margin: 10px 0;
}
.tdhc-urgent {
	border-left: 4px solid var(--tdhc-err);
	background: var(--tdhc-red);
	padding: 14px;
	border-radius: 8px;
	margin: 14px 0;
}
.tdhc-urgent ul { margin: 8px 0 0 20px; padding: 0; }

.tdhc-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	overflow: hidden !important;
}

.tdhc-footer {
	color: var(--tdhc-muted);
	font-size: 12px;
	text-align: center;
	margin: 16px 0 0;
	font-family: "DMSansRegular", Arial, Helvetica, sans-serif;
}

/* Contact & CTAs at the bottom of the completed section */
.tdhc-contact {
	text-align: center;
	border-top: 1px solid #e7edf1;
	padding-top: 24px;
	margin-top: 24px;
}
.tdhc-contact strong {
	display: block;
	color: #161719;
	font-size: 15px;
	font-weight: 700;
	font-family: "DMSansBold", Arial, Helvetica, sans-serif;
}
.tdhc-contact p {
	margin: 5px 0 0;
	color: var(--tdhc-muted);
	font-size: 13px;
	font-family: "DMSansRegular", Arial, Helvetica, sans-serif;
}
.tdhc a.tdhc-phone {
	display: inline-block;
	font-size: 24px;
	color: var(--tdhc-blue);
	text-decoration: none;
	font-weight: 800;
	margin-top: 8px;
	font-family: "DMSansBold", Arial, Helvetica, sans-serif;
	letter-spacing: -0.3px;
	transition: color 0.2s ease;
}
.tdhc a.tdhc-phone:hover {
	color: #174b82;
}

.tdhc-ctas {
	display: flex;
	gap: 12px;
	margin-top: 22px;
}
.tdhc-ctas > * {
	flex: 1;
}

.tdhc a.tdhc-btn--primary,
.tdhc button.tdhc-btn--secondary,
.tdhc .tdhc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	border: 0;
	border-radius: 11px;
	min-height: 48px;
	padding: 12px 18px;
	font-weight: 800;
	font-size: 15px;
	line-height: 1.2;
	cursor: pointer;
	text-decoration: none;
	letter-spacing: normal;
	font-family: "DMSansBold", Arial, Helvetica, sans-serif;
	transition: background-color 0.2s ease, opacity 0.2s ease;
	box-sizing: border-box;
}

.tdhc a.tdhc-btn--primary,
.tdhc .tdhc-btn--primary {
	background: var(--tdhc-blue) !important;
	color: #fff !important;
	text-decoration: none !important;
}
.tdhc a.tdhc-btn--primary:hover,
.tdhc a.tdhc-btn--primary:focus,
.tdhc a.tdhc-btn--primary:active,
.tdhc .tdhc-btn--primary:hover,
.tdhc .tdhc-btn--primary:focus,
.tdhc .tdhc-btn--primary:active {
	background: #174b82 !important;
	color: #fff !important;
	text-decoration: none !important;
}

.tdhc button.tdhc-btn--secondary,
.tdhc a.tdhc-btn--secondary,
.tdhc .tdhc-btn--secondary {
	background: #edf3f7 !important;
	color: var(--tdhc-blue) !important;
	text-decoration: none !important;
}
.tdhc button.tdhc-btn--secondary:hover,
.tdhc button.tdhc-btn--secondary:focus,
.tdhc button.tdhc-btn--secondary:active,
.tdhc a.tdhc-btn--secondary:hover,
.tdhc a.tdhc-btn--secondary:focus,
.tdhc a.tdhc-btn--secondary:active,
.tdhc .tdhc-btn--secondary:hover,
.tdhc .tdhc-btn--secondary:focus,
.tdhc .tdhc-btn--secondary:active {
	background: #e1eaf0 !important;
	color: #174b82 !important;
	text-decoration: none !important;
}

@media (max-width: 600px) {
	.tdhc-card {
		padding: 20px 18px;
	}
	.tdhc-card-head {
		padding: 18px 18px 14px;
		margin: -20px -18px 18px -18px;
	}
	.tdhc-grid, .tdhc-options {
		grid-template-columns: 1fr;
	}
	.tdhc-actions {
		flex-direction: column-reverse;
		gap: 10px;
	}
	.tdhc-actions button {
		width: 100%;
		padding: 12px 14px;
	}
	.tdhc-ctas {
		flex-direction: column;
	}
	.tdhc-ctas > * {
		width: 100%;
	}
}

/* Print only the health check */
@media print {
	body.tdhc-printing * { visibility: hidden; }
	body.tdhc-printing .tdhc, body.tdhc-printing .tdhc * { visibility: visible; }
	body.tdhc-printing .tdhc { position: absolute; left: 0; top: 0; width: 100%; margin: 0; max-width: none; }
	.tdhc .tdhc-actions, .tdhc .tdhc-footer, .tdhc .tdhc-contact, .tdhc .tdhc-ctas { display: none !important; }
	.tdhc-card { box-shadow: none; border: 0; }
}
