/* Tín Đức – Form nhận thông tin
 * Đổi màu thương hiệu: sửa các biến --tdf-* bên dưới.
 * Font dùng theo theme của website. */
.tdf {
	--tdf-accent: #1d5c48;        /* xanh lá đậm – màu chính */
	--tdf-accent-ink: #ffffff;
	--tdf-accent-soft: #e6efe9;
	--tdf-gold: #b8862f;          /* điểm nhấn đất / sổ đỏ */
	--tdf-ink: #1f2a26;
	--tdf-muted: #5d6b65;
	--tdf-line: #d5ddd8;
	--tdf-surface: #ffffff;
	--tdf-ground: #f5f7f5;
	--tdf-error: #b42318;
	--tdf-radius: 10px;
	color: var(--tdf-ink);
	font-size: 15px;
	line-height: 1.5;
	max-width: 760px;
	margin: 0 auto;
	box-sizing: border-box;
}
.tdf *, .tdf *::before, .tdf *::after { box-sizing: border-box; }
.tdf [hidden] { display: none !important; }

/* Tabs */
.tdf-tablist {
	display: flex;
	gap: 4px;
	overflow-x: auto;
	scrollbar-width: none;
	border-bottom: 2px solid var(--tdf-line);
	margin-bottom: 0;
}
.tdf-tablist::-webkit-scrollbar { display: none; }
.tdf-tablist button {
	flex: 0 0 auto;
	appearance: none;
	background: none;
	border: 0;
	border-bottom: 3px solid transparent;
	margin-bottom: -2px;
	padding: 12px 16px;
	font: inherit;
	font-weight: 600;
	color: var(--tdf-muted);
	cursor: pointer;
	white-space: nowrap;
}
.tdf-tablist button:hover { color: var(--tdf-ink); }
.tdf-tablist button[aria-selected="true"] {
	color: var(--tdf-accent);
	border-bottom-color: var(--tdf-gold);
}
.tdf-tablist button:focus-visible { outline: 2px solid var(--tdf-accent); outline-offset: -2px; }

/* Form shell */
.tdf-form {
	background: var(--tdf-surface);
	border: 1px solid var(--tdf-line);
	border-radius: var(--tdf-radius);
	padding: 28px;
	margin: 0;
}
.tdf-tabs .tdf-form { border-top: 0; border-radius: 0 0 var(--tdf-radius) var(--tdf-radius); }
.tdf-head { margin-bottom: 22px; }
.tdf-title {
	margin: 0 0 6px;
	font-size: 1.35em;
	line-height: 1.25;
	color: var(--tdf-accent);
	text-wrap: balance;
}
.tdf-intro { margin: 0; color: var(--tdf-muted); max-width: 60ch; }

.tdf-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 18px 20px;
}
.tdf-field { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.tdf-field--wide { grid-column: 1 / -1; }
.tdf-field > label, .tdf-field legend {
	font-weight: 600;
	font-size: 0.93em;
	padding: 0;
}
.tdf-field fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.tdf-field legend { margin: 0 0 8px; border: 0; width: auto; text-transform: none; letter-spacing: normal; color: inherit; }
.tdf .tdf-field > label { text-transform: none; letter-spacing: normal; color: inherit; margin: 0; }
.tdf-req { color: var(--tdf-gold); }

.tdf input[type="text"], .tdf input[type="tel"], .tdf input[type="email"],
.tdf input[type="number"], .tdf select, .tdf textarea {
	width: 100%;
	font: inherit;
	color: var(--tdf-ink);
	background: var(--tdf-ground);
	border: 1px solid var(--tdf-line);
	border-radius: 8px;
	padding: 11px 12px;
	min-height: 46px;
	box-shadow: none;
	transition: border-color .15s, background .15s;
}
.tdf textarea { resize: vertical; min-height: 96px; }
.tdf input:focus, .tdf select:focus, .tdf textarea:focus {
	outline: none;
	background: var(--tdf-surface);
	border-color: var(--tdf-accent);
	box-shadow: 0 0 0 3px var(--tdf-accent-soft);
}
.tdf ::placeholder { color: #8b9792; }

/* Lựa chọn dạng nút */
.tdf-choices { display: flex; flex-wrap: wrap; gap: 8px; }
.tdf-choice { position: relative; display: inline-flex; cursor: pointer; margin: 0; }
.tdf-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tdf-choice span {
	display: inline-block;
	padding: 9px 14px;
	border: 1px solid var(--tdf-line);
	border-radius: 999px;
	background: var(--tdf-ground);
	font-size: 0.93em;
	line-height: 1.3;
	transition: background .15s, border-color .15s, color .15s;
}
.tdf-choice:hover span { border-color: var(--tdf-accent); }
.tdf-choice input:checked + span {
	background: var(--tdf-accent);
	border-color: var(--tdf-accent);
	color: var(--tdf-accent-ink);
}
.tdf-field--checkbox .tdf-choice input:checked + span::before { content: "✓ "; }
.tdf-choice input:focus-visible + span { outline: 2px solid var(--tdf-gold); outline-offset: 2px; }

/* Lỗi */
.tdf-error { margin: 0; color: var(--tdf-error); font-size: 0.87em; min-height: 0; }
.tdf-error:empty { display: none; }
.tdf-field.has-error input, .tdf-field.has-error select, .tdf-field.has-error textarea { border-color: var(--tdf-error); }
.tdf-field.has-error .tdf-choice span { border-color: var(--tdf-error); }
.tdf-error--form { margin-top: 12px; font-weight: 600; }

/* Đồng ý + nút gửi */
.tdf-consent {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px dashed var(--tdf-line);
	font-size: 0.9em;
	color: var(--tdf-muted);
	cursor: pointer;
}
.tdf-consent input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--tdf-accent); flex: 0 0 auto; }
.tdf-consent.has-error { color: var(--tdf-error); }
.tdf-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 18px; }
.tdf-submit {
	appearance: none;
	border: 0;
	border-radius: 8px;
	background: var(--tdf-accent);
	color: var(--tdf-accent-ink);
	font: inherit;
	font-weight: 700;
	padding: 13px 28px;
	min-height: 48px;
	cursor: pointer;
	transition: filter .15s;
}
.tdf-submit:hover { filter: brightness(1.12); }
.tdf-submit:focus-visible { outline: 3px solid var(--tdf-gold); outline-offset: 2px; }
.tdf-submit[disabled] { opacity: .6; cursor: progress; }
.tdf-note { font-size: 0.85em; color: var(--tdf-muted); }

/* Thành công */
.tdf-success {
	border-left: 4px solid var(--tdf-gold);
	background: var(--tdf-accent-soft);
	border-radius: 6px;
	padding: 18px 20px;
}
.tdf-success strong { display: block; font-size: 1.1em; color: var(--tdf-accent); margin-bottom: 4px; }
.tdf-success p { margin: 0; }
.tdf-success .tdf-hotline { margin-top: 10px; font-size: 0.93em; }

/* Chống spam */
.tdf-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

@media (max-width: 600px) {
	.tdf-form { padding: 20px 16px; }
	.tdf-grid { grid-template-columns: minmax(0, 1fr); }
	.tdf-submit { width: 100%; }
	.tdf-tablist button { padding: 11px 12px; }
}
@media (prefers-reduced-motion: reduce) {
	.tdf * { transition: none !important; }
}
