/* WD Trợ lý chat – nút "Hỏi nhanh". Chỉ dùng biến CSS, không thư viện ngoài. */
:root {
	--wdtl-mau: #002D5B;      /* đầu khung, tin của khách */
	--wdtl-nhan: #FF7A3D;     /* nút "Hỏi nhanh", nút bấm */
	--wdtl-chu-mau: #fff;
	--wdtl-chu-nhan: #fff;
}

.wdtl-nut {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 99990;
	margin: 0;
	background: var(--wdtl-nhan);
	color: var(--wdtl-chu-nhan);
	border: 0;
	border-radius: 26px;
	padding: 11px 16px;
	font-family: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
	cursor: pointer;
	display: flex;
	align-items: center;
	gap: 7px;
	width: auto;
	height: auto;
	min-height: 0;
}

.wdtl-nut:focus-visible {
	outline: 3px solid var(--wdtl-mau);
	outline-offset: 2px;
}

.wdtl {
	position: fixed;
	right: 16px;
	bottom: 76px;
	z-index: 99991;
	width: min(380px, calc(100vw - 24px));
	height: min(540px, calc(100vh - 110px));
	background: #fff;
	border-radius: 14px;
	box-shadow: 0 14px 44px rgba(0, 0, 0, 0.28);
	display: none;
	flex-direction: column;
	overflow: hidden;
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	color: #1E1810;
	text-align: left;
}

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

.wdtl.mo {
	display: flex;
}

/* Chặn kiểu nút / ô nhập của giao diện tràn vào khung. */
.wdtl button,
.wdtl input,
.wdtl textarea {
	font: inherit;
	margin: 0;
	letter-spacing: normal;
	text-transform: none;
	text-shadow: none;
	box-shadow: none;
	min-height: 0;
	max-width: none;
	float: none;
}

.wdtl .dau {
	background: var(--wdtl-mau);
	color: var(--wdtl-chu-mau);
	padding: 12px 14px;
	display: flex;
	align-items: center;
	gap: 8px;
	flex: none;
}

.wdtl .dau b {
	font-size: 15.5px;
}

.wdtl .dau small {
	display: block;
	opacity: 0.8;
	font-size: 12px;
}

.wdtl .dong {
	margin-left: auto;
	background: none;
	border: 0;
	color: var(--wdtl-chu-mau);
	font-size: 22px;
	cursor: pointer;
	line-height: 1;
	padding: 0 4px;
	width: auto;
	height: auto;
}

.wdtl .than {
	flex: 1;
	min-height: 0;
	overflow: auto;
	overscroll-behavior: contain;
	padding: 12px;
	background: #F8F5F4;
}

.wdtl .tn {
	margin: 0 0 10px;
	max-width: 90%;
	padding: 9px 12px;
	border-radius: 12px;
	word-wrap: break-word;
	overflow-wrap: anywhere;
}

.wdtl .tn.hoi {
	margin-left: auto;
	background: var(--wdtl-mau);
	color: var(--wdtl-chu-mau);
	border-bottom-right-radius: 4px;
	white-space: pre-wrap;
}

.wdtl .tn.dap {
	background: #fff;
	border: 1px solid #e7e1dd;
	border-bottom-left-radius: 4px;
}

.wdtl .tn.dap p {
	margin: 0 0 6px;
}

.wdtl .tn.dap ul,
.wdtl .tn.dap ol {
	margin: 4px 0 6px;
	padding-left: 20px;
}

.wdtl .cac-nut {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.wdtl .cac-nut a {
	display: inline-block;
	padding: 7px 12px;
	border-radius: 10px;
	font-weight: 600;
	font-size: 13.5px;
	text-decoration: none;
	border: 1.5px solid var(--wdtl-nhan);
	color: var(--wdtl-nhan);
	background: #fff;
}

.wdtl .cac-nut a:first-child {
	background: var(--wdtl-nhan);
	color: var(--wdtl-chu-nhan);
}

.wdtl .trang {
	margin-top: 6px;
	font-size: 12.5px;
}

.wdtl .trang a {
	color: var(--wdtl-mau);
	text-decoration: underline;
	margin-right: 8px;
}

.wdtl .goi-y button {
	display: block;
	width: 100%;
	text-align: left;
	background: #fff;
	border: 1px solid #e7e1dd;
	border-radius: 9px;
	padding: 7px 10px;
	margin: 5px 0;
	cursor: pointer;
	font: inherit;
	font-size: 14px;
	color: var(--wdtl-mau);
	height: auto;
}

.wdtl .nhap {
	display: flex;
	gap: 6px;
	margin: 0;
	padding: 10px;
	border-top: 1px solid #e7e1dd;
	background: #fff;
	flex: none;
}

.wdtl textarea {
	flex: 1;
	resize: none;
	border: 1px solid #e7e1dd;
	border-radius: 9px;
	padding: 8px;
	font: inherit;
	font-size: 16px; /* 16px để điện thoại không tự phóng to khi gõ */
	height: 44px;
	width: auto;
	background: #fff;
	color: #1E1810;
}

.wdtl .gui {
	background: var(--wdtl-nhan);
	color: var(--wdtl-chu-nhan);
	border: 0;
	border-radius: 9px;
	padding: 0 14px;
	font-weight: 700;
	cursor: pointer;
	width: auto;
	height: auto;
}

.wdtl .gui:disabled,
.wdtl .gui-so:disabled {
	opacity: 0.6;
}

.wdtl .nho {
	font-size: 11.5px;
	color: #8a8582;
	text-align: center;
	padding: 0 10px 8px;
	background: #fff;
	flex: none;
}

.wdtl .dau + .than + .nho {
	padding-top: 8px; /* khi không có ô nhập */
}

/* Khung "Để lại số, chúng tôi gọi lại" */
.wdtl .de-lai {
	max-width: 100%;
}

.wdtl .de-lai form {
	margin: 0;
}

.wdtl .de-lai label {
	display: block;
	margin: 0 0 8px;
	font-size: 13px;
	font-weight: 400;
	color: #575250;
}

.wdtl .de-lai input[type="text"],
.wdtl .de-lai textarea {
	display: block;
	width: 100%;
	height: auto;
	margin-top: 3px;
	border: 1px solid #e7e1dd;
	border-radius: 9px;
	padding: 8px 10px;
	font-size: 16px;
	background: #fff;
	color: #1E1810;
}

.wdtl .de-lai textarea {
	resize: vertical;
}

.wdtl .de-lai .bao {
	color: #b32d2e;
	font-size: 13px;
	margin: 0 0 6px;
}

.wdtl .de-lai .bao:empty {
	display: none;
}

.wdtl .gui-so {
	display: block;
	width: 100%;
	height: auto;
	background: var(--wdtl-nhan);
	color: var(--wdtl-chu-nhan);
	border: 0;
	border-radius: 10px;
	padding: 10px 12px;
	font-weight: 700;
	cursor: pointer;
}

/* Ô bẫy máy dò: người xem không thấy */
.wdtl .wdtl-bay {
	position: absolute !important;
	left: -10000px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	overflow: hidden !important;
	pointer-events: none !important;
}

@media print {
	.wdtl,
	.wdtl-nut {
		display: none !important;
	}
}
