/*
 * Nguyen vong ung vien - giao dien form
 * Bien mau co the ghi de bang CSS cua theme.
 */

.tdf-wrap {
	--tdf-primary: #1a56db;
	--tdf-primary-dark: #13389c;
	--tdf-text: #1f2937;
	--tdf-muted: #6b7280;
	--tdf-border: #d7dde7;
	--tdf-bg: #ffffff;
	--tdf-soft: #f4f7fb;
	--tdf-danger: #d92d20;
	--tdf-radius: 10px;

	max-width: 760px;
	margin: 0 auto;
	color: var(--tdf-text);
	font-size: 16px;
	line-height: 1.6;
	-webkit-font-smoothing: antialiased;
}

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

.tdf-form {
	background: var(--tdf-bg);
	border: 1px solid var(--tdf-border);
	border-radius: 16px;
	padding: 32px 34px 36px;
	box-shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 12px 32px -18px rgba(16, 24, 40, .25);
}

/* ---------- Thong bao loi chung ---------- */

.tdf-alert {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0 0 22px;
	padding: 12px 16px;
	border: 1px solid #f5c2c0;
	border-left: 4px solid var(--tdf-danger);
	border-radius: 8px;
	background: #fef3f2;
	color: var(--tdf-danger);
	font-weight: 600;
}

.tdf-alert[hidden] {
	display: none;
}

.tdf-alert__icon {
	display: inline-flex;
	flex: none;
}

/* ---------- Thanh tien do ---------- */

.tdf-progress {
	position: sticky;
	top: 0;
	z-index: 2;
	height: 4px;
	margin: 0 0 26px;
	border-radius: 999px;
	background: var(--tdf-soft);
	overflow: hidden;
}

.tdf-progress__bar {
	display: block;
	width: 0;
	height: 100%;
	border-radius: 999px;
	background: linear-gradient(90deg, var(--tdf-primary), #22c3a6);
	transition: width .35s ease;
}

/* ---------- Tieu de & ghi chu ---------- */

.tdf-heading {
	margin: 8px 0 22px;
	font-size: 19px;
	font-weight: 700;
	letter-spacing: .02em;
	color: var(--tdf-text);
}

.tdf-note {
	margin: 30px 0 26px;
	padding: 16px 18px;
	border-radius: var(--tdf-radius);
	border: 1px solid #dbe6f7;
	background: var(--tdf-soft);
	font-weight: 700;
	color: var(--tdf-primary-dark);
	line-height: 1.55;
}

/* ---------- Truong nhap ---------- */

.tdf-field {
	margin: 0 0 22px;
}

.tdf-label {
	display: block;
	margin: 0 0 8px;
	font-size: 15.5px;
	font-weight: 500;
	color: #33445c;
}

.tdf-req {
	color: var(--tdf-primary);
	font-weight: 700;
}

.tdf-label-sub {
	margin: -2px 0 10px;
	font-size: 14.5px;
	color: var(--tdf-muted);
	line-height: 1.55;
}

.tdf-input {
	display: block;
	width: 100%;
	padding: 12px 14px;
	font: inherit;
	font-size: 16px;
	color: var(--tdf-text);
	background: #fff;
	border: 1px solid var(--tdf-border);
	border-radius: var(--tdf-radius);
	transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}

.tdf-input::placeholder {
	color: #9aa4b2;
}

.tdf-input:hover {
	border-color: #b9c4d4;
}

.tdf-input:focus {
	outline: none;
	border-color: var(--tdf-primary);
	box-shadow: 0 0 0 3px rgba(26, 86, 219, .14);
}

.tdf-textarea {
	min-height: 56px;
	resize: vertical;
	overflow: hidden;
	line-height: 1.6;
}

.tdf-field.is-invalid .tdf-input {
	border-color: var(--tdf-danger);
	background: #fffafa;
}

.tdf-field.is-invalid .tdf-input:focus {
	box-shadow: 0 0 0 3px rgba(217, 45, 32, .12);
}

.tdf-error {
	display: none;
	margin-top: 6px;
	font-size: 13.5px;
	color: var(--tdf-danger);
}

.tdf-field.is-invalid .tdf-error {
	display: block;
}

/* ---------- Thang diem 1-10 ---------- */

.tdf-scale {
	display: grid;
	grid-template-columns: repeat(10, minmax(0, 1fr));
	gap: 8px;
}

.tdf-scale__item {
	position: relative;
	display: block;
	cursor: pointer;
}

.tdf-scale__item input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}

.tdf-scale__item span {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 46px;
	border: 1px solid var(--tdf-border);
	border-radius: var(--tdf-radius);
	background: #fff;
	font-size: 16px;
	font-weight: 600;
	color: #44546b;
	transition: all .15s ease;
}

.tdf-scale__item:hover span {
	border-color: var(--tdf-primary);
	color: var(--tdf-primary);
}

.tdf-scale__item input:focus-visible + span {
	box-shadow: 0 0 0 3px rgba(26, 86, 219, .18);
}

.tdf-scale__item input:checked + span {
	background: var(--tdf-primary);
	border-color: var(--tdf-primary);
	color: #fff;
	box-shadow: 0 4px 12px -4px rgba(26, 86, 219, .55);
}

.tdf-field--scale.is-invalid .tdf-scale__item span {
	border-color: #f0a9a4;
}

/* ---------- Nut gui ---------- */

.tdf-hint {
	margin: 30px 0 10px;
	color: var(--tdf-muted);
	font-size: 15px;
}

.tdf-submit {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 54px;
	padding: 14px 24px;
	border: 0;
	border-radius: var(--tdf-radius);
	background: var(--tdf-primary);
	color: #fff;
	font: inherit;
	font-size: 17px;
	font-weight: 600;
	cursor: pointer;
	transition: background-color .15s ease, transform .1s ease, box-shadow .15s ease;
}

.tdf-submit:hover {
	background: var(--tdf-primary-dark);
	box-shadow: 0 10px 24px -12px rgba(19, 56, 156, .8);
}

.tdf-submit:active {
	transform: translateY(1px);
}

.tdf-submit:disabled {
	opacity: .75;
	cursor: progress;
}

.tdf-spinner {
	display: none;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, .45);
	border-top-color: #fff;
	border-radius: 50%;
	animation: tdf-spin .7s linear infinite;
}

.tdf-form.is-sending .tdf-spinner {
	display: block;
}

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

.tdf-form-error {
	margin: 14px 0 0;
	color: var(--tdf-danger);
	font-weight: 600;
	text-align: center;
}

.tdf-form-error[hidden] {
	display: none;
}

/* ---------- Man hinh cam on ---------- */

.tdf-success {
	display: flex;
	gap: 16px;
	align-items: flex-start;
	padding: 30px 32px;
	border: 1px solid #b7e4c7;
	border-radius: 16px;
	background: #f2fbf5;
	color: #14532d;
}

.tdf-success[hidden] {
	display: none;
}

.tdf-success__icon {
	flex: none;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 52px;
	height: 52px;
	border-radius: 50%;
	background: #d4f5de;
	color: #15803d;
}

.tdf-success__text p {
	margin: 0 0 8px;
	font-size: 17px;
}

.tdf-success__text p:last-child {
	margin-bottom: 0;
}

/* ---------- Honeypot ---------- */

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

/* ---------- Man hinh nho ---------- */

@media (max-width: 640px) {
	.tdf-form {
		padding: 22px 18px 26px;
		border-radius: 12px;
	}

	.tdf-scale {
		grid-template-columns: repeat(5, minmax(0, 1fr));
	}

	.tdf-heading {
		font-size: 17.5px;
	}

	.tdf-input {
		font-size: 16px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.tdf-wrap * {
		transition: none !important;
		animation: none !important;
	}
}

/* ---------- Danh sach tha xuong ---------- */

.tdf-select {
	appearance: none;
	-webkit-appearance: none;
	padding-right: 40px;
	background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	background-size: 16px;
	cursor: pointer;
}

/* ---------- Chon mot / chon nhieu ---------- */

.tdf-choices {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 10px;
}

.tdf-choice {
	position: relative;
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 11px 16px 11px 14px;
	border: 1px solid var(--tdf-border);
	border-radius: var(--tdf-radius);
	background: #fff;
	cursor: pointer;
	transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.tdf-choice:hover {
	border-color: var(--tdf-primary);
}

.tdf-choice input {
	width: 18px;
	height: 18px;
	margin: 0;
	accent-color: var(--tdf-primary);
	cursor: pointer;
}

.tdf-choice:has(input:checked) {
	border-color: var(--tdf-primary);
	background: #f3f7ff;
	box-shadow: inset 0 0 0 1px var(--tdf-primary);
}

.tdf-choice input:focus-visible {
	outline: 2px solid var(--tdf-primary);
	outline-offset: 2px;
}

.tdf-field--checkbox.is-invalid .tdf-choice,
.tdf-field--radio.is-invalid .tdf-choice {
	border-color: #f0a9a4;
}

/* ---------- Khoi HTML tu do ---------- */

.tdf-html {
	margin: 0 0 22px;
	color: var(--tdf-muted);
}

@media (max-width: 640px) {
	.tdf-choices {
		flex-direction: column;
		align-items: stretch;
	}
}
tail -12 assets/css/tdf-form.css

/* ---------- Tieu de phu ---------- */

.tdf-subheading {
	margin: 30px 0 18px;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.45;
	color: var(--tdf-text);
}

.tdf-heading + .tdf-subheading {
	margin-top: 14px;
}

/* ---------- Cau hoi lam nhan cho nhieu o nhap ben duoi ---------- */

.tdf-question {
	margin: 26px 0 14px;
	font-size: 15.5px;
	font-weight: 500;
	line-height: 1.55;
	color: #33445c;
}

/* ---------- Trac nghiem dang nut bam ---------- */

.tdf-options {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.tdf-option {
	position: relative;
	flex: 1 1 140px;
	display: block;
	cursor: pointer;
}

.tdf-option input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	margin: 0;
}

.tdf-option span {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 52px;
	padding: 12px 16px;
	border: 1px solid var(--tdf-border);
	border-radius: var(--tdf-radius);
	background: #fff;
	font-size: 16px;
	color: #44546b;
	text-align: center;
	line-height: 1.35;
	transition: all .15s ease;
}

.tdf-option:hover span {
	border-color: var(--tdf-primary);
	color: var(--tdf-primary);
}

.tdf-option input:focus-visible + span {
	box-shadow: 0 0 0 3px rgba(26, 86, 219, .18);
}

.tdf-option input:checked + span {
	background: var(--tdf-primary);
	border-color: var(--tdf-primary);
	color: #fff;
	font-weight: 600;
	box-shadow: 0 4px 12px -4px rgba(26, 86, 219, .55);
}

.tdf-field--radio.is-invalid .tdf-option span {
	border-color: #f0a9a4;
}

@media (max-width: 640px) {
	.tdf-option {
		flex: 1 1 100%;
	}
}

/* ---------- Duong dan xem noi dung / hinh anh ---------- */

.tdf-linkline {
	margin: 26px 0 26px;
}

.tdf-link {
	display: inline-block;
	font-size: 15px;
	font-weight: 500;
	line-height: 1.5;
	color: var(--tdf-primary);
	text-decoration: none;
	border-bottom: 1px solid transparent;
	transition: color .2s ease, border-color .2s ease;
}

.tdf-link:hover,
.tdf-link:focus {
	color: var(--tdf-primary-dark);
	border-bottom-color: currentColor;
}

.tdf-link.is-empty {
	color: var(--tdf-muted);
	cursor: default;
}

/* ---------- O chon tep dinh kem ---------- */

.tdf-file {
	padding: 12px 14px;
	font-size: 15px;
	line-height: 1.4;
	cursor: pointer;
	background: var(--tdf-bg);
}

.tdf-file::file-selector-button {
	margin-right: 12px;
	padding: 8px 14px;
	border: 1px solid var(--tdf-border);
	border-radius: 8px;
	background: var(--tdf-soft);
	color: var(--tdf-primary-dark);
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background .2s ease, border-color .2s ease;
}

.tdf-file::file-selector-button:hover {
	border-color: var(--tdf-primary);
	background: #e9f0fb;
}
