/* =========================================================================
 * X3SALES DV CTA — element vhm_thm_cta
 * Khối CTA đặt hàng: cột trái = banner ưu đãi + ảnh sản phẩm + lợi ích;
 * cột phải = bảng form (đếm ngược + form đặt hàng).
 * Bản gốc dựng absolute px cố định → ở đây chuyển sang flex/grid responsive.
 * Màu/ảnh đổ qua --thm-cta-* trên thẻ gốc. Scope dưới .thm-cta.
 * ========================================================================= */

@font-face {
	font-family: "THM Megante";
	src: url("https://w.ladicdn.com/5dadc2a03bf9ab4ea2cc8ccb/svn-megante-20231018093528-hgdbo.otf");
	font-display: swap;
}
.thm-cta__cd-box {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    border-radius: 4px;
    background-color: rgb(38, 75, 156) !important;
    font-size: 25px;
    font-weight: bold;
    color: #fff;
}
.thm-cta {
    position: relative;
    width: 100%;
    padding: 40px 15px;
    background-color: rgb(38, 75, 156) !important;
}
.thm-cta,
.thm-cta * {
	box-sizing: border-box;
}

.thm-cta {
	position: relative;
	width: 100%;
	padding: 40px 15px;
	background-color: var(--thm-cta-bg, #7f5604);
}

.thm-cta__inner {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: stretch;
	gap: 30px;
}

.thm-cta__left {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 22px;
}

.thm-cta__right {
	flex: 0 0 432px;
	max-width: 432px;
}

/* -------- Banner ưu đãi -------- */
.thm-cta__promo {
	position: relative;
	display: flex;
	align-items: center;
	gap: 22px;
	padding: 22px 28px;
	border-radius: 6px;
	background-color: #fff;
	background-image: var(--thm-cta-promo, none);
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
	animation: thmBounceInLeft 1.5s ease 0s 1;
}

.thm-cta__promo-text {
	flex: 0 0 auto;
	max-width: 340px;
}

.thm-cta__promo-title {
	margin: 0;
	font-family: "THM Megante", Arial, sans-serif;
	font-size: 28px;
	line-height: 1.4;
	color: var(--thm-cta-accent, #b87f0f);
	text-transform: uppercase;
	text-align: center;
}

.thm-cta__promo-bracket {
	flex: 0 0 auto;
	width: 1px;
	height: 60px;
	background-color: #a4a4a4;
}

.thm-cta__promo-offer {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 0 6px;
}

.thm-cta__promo-free {
	font-size: 25px;
	font-weight: bold;
	line-height: 1.2;
	color: #424242;
	text-transform: uppercase;
}

.thm-cta__promo-num {
	font-size: 68px;
	font-weight: bold;
	line-height: 1;
	color: var(--thm-cta-bg, #7f5604);
}

.thm-cta__promo-pct {
	font-size: 54px;
	font-weight: bold;
	line-height: 1;
	color: var(--thm-cta-bg, #7f5604);
}

.thm-cta__promo-sub {
	flex: 0 0 100%;
	max-width: 200px;
	font-size: 12px;
	font-weight: bold;
	line-height: 1.2;
	color: #000;
}

/* -------- Ảnh sản phẩm -------- */
.thm-cta__photo {
	position: relative;
	flex: 1 1 auto;
	min-height: 220px;
	border-radius: 6px;
	overflow: hidden;
}

.thm-cta__photo-bg {
	position: absolute;
	inset: 0;
	background-image: var(--thm-cta-product, none);
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
}

.thm-cta__photo-overlay {
	position: absolute;
	inset: 0;
	background-image: linear-gradient(rgba(255, 255, 255, 0.35), rgba(255, 255, 255, 0));
	pointer-events: none;
}

/* -------- Lợi ích -------- */
.thm-cta__benefits {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.thm-cta__benefit {
	display: flex;
	align-items: flex-start;
	gap: 10px;
}

.thm-cta__benefit-icon {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	margin-top: 3px;
	color: #f2b879;
}

.thm-cta__benefit-icon svg {
	display: block;
	width: 100%;
	height: 100%;
	fill: currentColor;
}

.thm-cta__benefit-text {
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
	color: #fff;
	text-align: justify;
}

/* -------- Bảng form (phải) -------- */
.thm-cta__formwrap {
	position: relative;
	height: 100%;
	padding: 32px 46px;
	border-radius: 6px;
	overflow: hidden;
	animation: thmFadeInRight 1.5s ease 0s 1;
}

.thm-cta__form-bg {
	position: absolute;
	inset: 0;
	background-color: #6a4903;
	background-image: var(--thm-cta-form, none);
	background-repeat: no-repeat;
	background-position: center center;
	background-size: cover;
	pointer-events: none;
}

.thm-cta__form-inner {
	position: relative;
	z-index: 1;
}

/* Đếm ngược */
.thm-cta__cdwrap {
	margin-bottom: 22px;
}

.thm-cta__cd-title {
	margin-bottom: 12px;
	font-size: 16px;
	font-weight: bold;
	line-height: 1.6;
	color: #3c3c3c;
	text-align: center;
}

.thm-cta__countdown {
	display: flex;
	gap: 10px;
}

.thm-cta__cd-item {
	flex: 1 1 0;
	text-align: center;
}

.thm-cta__cd-box {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 60px;
	border-radius: 4px;
	background-color: var(--thm-cta-bg, #7f5604);
	font-size: 25px;
	font-weight: bold;
	color: #fff;
}

.thm-cta__cd-label {
	margin-top: 4px;
	font-size: 12px;
	line-height: 1.6;
	color: #494747;
}

/* Form */
.thm-cta__field {
	margin-bottom: 8px;
	border: 1px solid #eee;
	background-color: var(--thm-cta-bg, #7f5604);
}

.thm-cta__field input,
.thm-cta__field select {
	width: 100%;
	height: 42px;
	padding: 0 15px;
	background-color: transparent;
	border: none;
	outline: none;
	color: #fff;
	font-size: 14px;
	line-height: 1.6;
}

.thm-cta__field input::placeholder {
	color: rgba(255, 255, 255, 0.85);
}

.thm-cta__select {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	padding-right: 28px !important;
	background-image: url("data:image/svg+xml;utf8,%3Csvg width='32' height='24' viewBox='0 0 32 24' xmlns='http://www.w3.org/2000/svg'%3E%3Cpolygon points='0,0 32,0 16,24' style='fill: rgb(255, 255, 255)'%3E%3C/polygon%3E%3C/svg%3E");
	background-size: 9px 6px;
	background-position: right 12px center;
	background-repeat: no-repeat;
}

.thm-cta__select option {
	color: initial;
}

.thm-cta__submit {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 196px;
	max-width: 100%;
	height: 43px;
	margin: 16px auto 0;
	border: 0;
	border-radius: 1000px;
	background-image: linear-gradient(rgb(255, 230, 182), rgb(225, 160, 28));
	box-shadow: rgba(146, 86, 42, 0.6) 0 8px 18px -10px;
	cursor: pointer;
}

.thm-cta__submit span {
	font-size: 16px;
	font-weight: bold;
	line-height: 1.6;
	color: #33281d;
	text-align: center;
}

.thm-cta__submit:active {
	transform: translateY(2px);
	transition: transform 0.2s linear;
}

.thm-cta__submit:disabled {
	opacity: 0.7;
	cursor: default;
}

.thm-cta__message {
	margin: 12px 0 0;
	min-height: 1em;
	font-size: 14px;
	line-height: 1.5;
	text-align: center;
	color: #fff;
}

.thm-cta__message.is-success {
	color: #b6f0c2;
}

.thm-cta__message.is-error {
	color: #ffd0d0;
}

/* -------- Animation -------- */
@keyframes thmFadeInRight {
	0% { opacity: 0; transform: translateX(40px); }
	100% { opacity: 1; transform: translateX(0); }
}

@keyframes thmBounceInLeft {
	0% { opacity: 0; transform: translateX(-600px); }
	60% { opacity: 1; transform: translateX(20px); }
	80% { transform: translateX(-8px); }
	100% { transform: translateX(0); }
}

@keyframes thmFadeInUp {
	0% { opacity: 0; transform: translateY(20px); }
	100% { opacity: 1; transform: translateY(0); }
}

/* -------- Tablet / mobile: xếp dọc -------- */
@media (max-width: 991px) {
	.thm-cta__inner {
		flex-direction: column;
	}

	.thm-cta__right {
		flex-basis: auto;
		max-width: 100%;
	}

	.thm-cta__promo,
	.thm-cta__formwrap {
		animation-name: thmFadeInUp;
	}
}

@media (max-width: 767px) {
	.thm-cta__promo {
		flex-wrap: wrap;
		gap: 12px;
		padding: 18px;
	}

	.thm-cta__promo-text {
		flex: 1 1 100%;
		max-width: 100%;
	}

	.thm-cta__promo-bracket {
		display: none;
	}

	.thm-cta__promo-title {
		font-size: 18px;
	}

	.thm-cta__promo-num {
		font-size: 44px;
	}

	.thm-cta__promo-pct {
		font-size: 32px;
	}

	.thm-cta__formwrap {
		padding: 26px 22px;
	}

	.thm-cta__benefit-text {
		text-align: left;
		font-size: 15px;
	}
}

/* -------------------------------------------------------------------------
 * Chế độ UX Builder ("chip viền builder"): các dòng lợi ích hiện thành chip CÓ
 * VIỀN để dễ nhìn/kéo-thả/sửa. Phần còn lại render gần như thật để dễ canh.
 * ---------------------------------------------------------------------- */
.thm-cta__builder-note {
	margin: 0 0 6px;
	color: #fff;
	font-size: 13px;
	font-style: italic;
	opacity: 0.85;
}

.thm-cta__b-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border: 1px dashed rgba(255, 255, 255, 0.7);
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.08);
	color: #fff;
	font-size: 14px;
	line-height: 1.5;
}

.thm-cta__b-icon {
	flex: 0 0 auto;
	width: 18px;
	height: 18px;
	color: #f2b879;
}

.thm-cta__b-icon svg {
	display: block;
	width: 100%;
	height: 100%;
	fill: currentColor;
}

.thm-cta__b-tag {
	flex: 0 0 auto;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--fs-color-primary, #264b9c);
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	text-transform: uppercase;
}

.thm-cta__b-text {
	flex: 1 1 auto;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* -------------------------------------------------------------------------
 * Form Contact Form 7 chèn vào bảng form: cho khớp khung (full-width, gọn gàng).
 * ---------------------------------------------------------------------- */
.thm-cta__cf7 .wpcf7-form p {
	margin: 0 0 10px;
}

.thm-cta__cf7 input[type="text"],
.thm-cta__cf7 input[type="email"],
.thm-cta__cf7 input[type="tel"],
.thm-cta__cf7 input[type="number"],
.thm-cta__cf7 input[type="date"],
.thm-cta__cf7 textarea,
.thm-cta__cf7 select {
	width: 100%;
	margin: 0;
}

.thm-cta__cf7 textarea {
	min-height: 90px;
}

/* Ghi chú trong UX Builder khi đã chọn form CF7 (frontend không thấy). */
.thm-cta__cf7-note {
	padding: 18px;
	border: 1px dashed rgba(255, 255, 255, 0.7);
	border-radius: 8px;
	background: rgba(0, 0, 0, 0.25);
	color: #fff;
	font-size: 14px;
	font-style: italic;
	text-align: center;
}

/* Nút submit của form CF7 trong khối CTA: căn giữa + bo tròn. */
.thm-cta__cf7 .wpcf7-submit.thm-cta__submit {
	display: block;
	width: -moz-fit-content;
	width: fit-content;
	max-width: 100%;
	height: auto;          /* bỏ height:43px cố định của rule gốc → hết lệch chữ */
	margin: 10px auto 0;
	padding: 12px 40px;
	border-radius: 99px;
	line-height: 1.2;       /* input không dùng flex được → căn dọc bằng padding/line-height */
	text-align: center;
}
