/* =========================================================
   iCheck — Popup đăng ký tư vấn (dùng chung toàn site)
   File tách riêng để trang không có widget nào vẫn dùng được
   mà không phải tải cả stylesheet widget lẫn Swiper.
   ========================================================= */
.icwe-cf-modal {
	--icwe-cf-primary: #33b44a;
	--icwe-cf-primary-dark: #02901b;
	--icwe-cf-dark: #011b26;
	--icwe-cf-text: #101828;
	--icwe-cf-gray: #475467;
	--icwe-cf-border: #d0d5dd;
	--icwe-cf-danger: #d92d20;

	position: fixed;
	inset: 0;
	z-index: 999999;
	display: none;
	font-family: inherit;
}
.icwe-cf-modal.is-open {
	display: block;
}
.icwe-cf-modal * {
	box-sizing: border-box;
}

.icwe-cf-overlay {
	position: absolute;
	inset: 0;
	background: rgba(1, 27, 38, 0.75);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
}

/* --- Khung 2 cột: cột trái thương hiệu, cột phải form --- */
.icwe-cf-dialog {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	display: flex;
	width: min(940px, calc(100vw - 32px));
	max-height: calc(100vh - 48px);
	overflow: hidden;
	border-radius: 24px;
	background: #fff;
	box-shadow: 0 32px 90px rgba(1, 27, 38, 0.4);
}

.icwe-cf-close {
	position: absolute;
	top: 16px;
	right: 16px;
	z-index: 3;
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #f2f4f7;
	color: var(--icwe-cf-gray);
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}
.icwe-cf-close:hover {
	background: var(--icwe-cf-primary);
	color: #fff;
}

/* --- Cột trái --- */
.icwe-cf-aside {
	position: relative;
	flex: 0 0 340px;
	padding: 40px 32px;
	overflow: hidden;
	background: linear-gradient(160deg, var(--icwe-cf-dark) 0%, #04372a 100%);
	color: #fff;
}
/* Quầng sáng xanh cho nền tối đỡ phẳng */
.icwe-cf-aside-glow {
	position: absolute;
	left: -80px;
	bottom: -120px;
	width: 320px;
	height: 320px;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(51, 180, 74, 0.45) 0%, rgba(51, 180, 74, 0) 70%);
	pointer-events: none;
}
.icwe-cf-aside-inner {
	position: relative;
	z-index: 2;
}

.icwe-cf-badge {
	display: inline-flex;
	align-items: center;
	margin-bottom: 16px;
	padding: 8px 14px;
	border-radius: 99px;
	background: rgba(51, 180, 74, 0.18);
	color: #6ce87a;
	font-size: 13px;
	font-weight: 600;
}
.icwe-cf-title {
	margin: 0 0 12px;
	font-size: 28px;
	line-height: 1.25;
	font-weight: 700;
	color: #fff;
}
.icwe-cf-desc {
	margin: 0;
	font-size: 15px;
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.72);
}

.icwe-cf-benefits {
	list-style: none;
	margin: 28px 0 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 14px;
}
.icwe-cf-benefits li {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 14px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.9);
}
.icwe-cf-benefits svg {
	flex-shrink: 0;
	margin-top: 1px;
	color: var(--icwe-cf-primary);
}

/* --- Cột phải --- */
.icwe-cf-panel {
	flex: 1 1 auto;
	min-width: 0;
	padding: 40px;
	overflow-y: auto;
}

.icwe-cf-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
}
.icwe-cf-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
	min-width: 0;
}
.icwe-cf-label {
	font-size: 14px;
	font-weight: 600;
	color: var(--icwe-cf-text);
}
.icwe-cf-req {
	color: var(--icwe-cf-danger);
}

.icwe-cf-input {
	width: 100%;
	height: 46px;
	padding: 0 14px;
	border: 1px solid var(--icwe-cf-border);
	border-radius: 10px;
	background: #fff;
	font-size: 15px;
	font-family: inherit;
	color: var(--icwe-cf-text);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.icwe-cf-input:focus {
	outline: none;
	border-color: var(--icwe-cf-primary);
	box-shadow: 0 0 0 4px rgba(51, 180, 74, 0.14);
}
.icwe-cf-select {
	appearance: none;
	-webkit-appearance: none;
	/* Mũi tên vẽ bằng data URI để không phải kèm thêm file ảnh */
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none'%3E%3Cpath d='M6 9l6 6 6-6' stroke='%23475467' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 14px center;
	padding-right: 40px;
}

.icwe-cf-field.has-error .icwe-cf-input {
	border-color: var(--icwe-cf-danger);
}
.icwe-cf-field.has-error .icwe-cf-input:focus {
	box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.12);
}
.icwe-cf-error {
	display: none;
	font-size: 13px;
	color: var(--icwe-cf-danger);
}
.icwe-cf-field.has-error .icwe-cf-error {
	display: block;
}

/* Bẫy bot: giấu khỏi mắt người nhưng vẫn nằm trong DOM */
.icwe-cf-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

.icwe-cf-form-error {
	display: none;
	margin: 16px 0 0;
	padding: 10px 14px;
	border-radius: 10px;
	background: rgba(217, 45, 32, 0.08);
	color: var(--icwe-cf-danger);
	font-size: 14px;
}
.icwe-cf-form-error.is-visible {
	display: block;
}

.icwe-cf-submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	margin-top: 24px;
	padding: 14px 24px;
	border: 0;
	border-radius: 10px;
	background: linear-gradient(90deg, #0eb52c, var(--icwe-cf-primary-dark));
	color: #fff;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	transition: opacity 0.2s ease, transform 0.2s ease;
}
.icwe-cf-submit:hover {
	opacity: 0.92;
	transform: translateY(-1px);
}
.icwe-cf-submit[disabled] {
	opacity: 0.6;
	cursor: default;
	transform: none;
}

.icwe-cf-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.4);
	border-top-color: #fff;
	border-radius: 50%;
	animation: icwe-cf-spin 0.7s linear infinite;
}
.icwe-cf-submit.is-loading .icwe-cf-spinner {
	display: block;
}
@keyframes icwe-cf-spin {
	to {
		transform: rotate(360deg);
	}
}

/* --- Màn hình thành công (thay chỗ form, cột trái giữ nguyên) --- */
.icwe-cf-success {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: 320px;
	text-align: center;
}
.icwe-cf-success[hidden] {
	display: none;
}
.icwe-cf-success-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 80px;
	height: 80px;
	margin-bottom: 20px;
	border-radius: 50%;
	background: rgba(51, 180, 74, 0.12);
	color: var(--icwe-cf-primary);
}
.icwe-cf-success-title {
	margin: 0 0 8px;
	font-size: 24px;
	font-weight: 700;
	color: var(--icwe-cf-text);
}
.icwe-cf-success-text {
	margin: 0;
	font-size: 16px;
	line-height: 1.6;
	color: var(--icwe-cf-gray);
}
.icwe-cf-success-close {
	max-width: 200px;
}

/* Khoá cuộn nền mà vẫn giữ nguyên vị trí đang đọc */
body.icwe-cf-locked {
	position: fixed;
	width: 100%;
	overflow: hidden;
}

/* --- Hiệu ứng mở --- */
@keyframes icwe-cf-fade {
	from {
		opacity: 0;
	}
}
@keyframes icwe-cf-pop {
	from {
		opacity: 0;
		transform: translate(-50%, calc(-50% + 16px)) scale(0.97);
	}
}
.icwe-cf-modal.is-open .icwe-cf-overlay {
	animation: icwe-cf-fade 0.2s ease both;
}
.icwe-cf-modal.is-open .icwe-cf-dialog {
	animation: icwe-cf-pop 0.28s cubic-bezier(0.16, 1, 0.3, 1) both;
}
@media (prefers-reduced-motion: reduce) {
	.icwe-cf-modal.is-open .icwe-cf-overlay,
	.icwe-cf-modal.is-open .icwe-cf-dialog {
		animation: none;
	}
	.icwe-cf-spinner {
		animation-duration: 2s;
	}
}

/* --- Hẹp: xếp dọc, cột trái co lại thành dải đầu --- */
@media (max-width: 880px) {
	.icwe-cf-dialog {
		flex-direction: column;
		width: min(560px, calc(100vw - 24px));
		overflow-y: auto;
	}
	.icwe-cf-aside {
		flex: 0 0 auto;
		padding: 32px 28px 28px;
	}
	.icwe-cf-title {
		font-size: 24px;
	}
	/* Bỏ danh sách quyền lợi để dành chiều cao cho form */
	.icwe-cf-benefits {
		display: none;
	}
	.icwe-cf-panel {
		padding: 28px;
		overflow: visible;
	}
	.icwe-cf-close {
		background: rgba(255, 255, 255, 0.16);
		color: #fff;
	}
}

@media (max-width: 560px) {
	.icwe-cf-dialog {
		width: calc(100vw - 24px);
		border-radius: 20px;
	}
	.icwe-cf-aside {
		padding: 28px 20px 24px;
	}
	.icwe-cf-panel {
		padding: 24px 20px;
	}
	.icwe-cf-grid {
		grid-template-columns: minmax(0, 1fr);
	}
	.icwe-cf-title {
		font-size: 21px;
	}
	.icwe-cf-desc {
		font-size: 14px;
	}
	.icwe-cf-success {
		min-height: 0;
		padding: 12px 0;
	}
}
