/**
 * IW Lead Popup — [iw_lead_popup].
 *
 * Nút trigger + overlay modal. Form bên trong dùng style của banner-cta-form.css
 * (scope .iw-banner-cta-form) — file này chỉ lo nút + overlay/dialog.
 * Scope toàn bộ dưới .iw-lead-popup* để không bleed ra global.
 */

/* ─────────────── Trigger button ─────────────── */
.iw-lead-popup {
	display: block;
}
.iw-lead-popup--align-left   { text-align: left; }
.iw-lead-popup--align-center { text-align: center; }
.iw-lead-popup--align-right  { text-align: right; }

.iw-lead-popup__trigger {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin: 0;
	padding: 12px 28px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.2;
	border-radius: 999px;
	border: 2px solid #ff6b17;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease, box-shadow .2s ease;
}
.iw-lead-popup__trigger--solid {
	background: #ff6b17;
	color: #fff;
}
.iw-lead-popup__trigger--solid:hover {
	background: #e85d0c;
	border-color: #e85d0c;
}
.iw-lead-popup__trigger--outline {
	background: transparent;
	color: #ff6b17;
}
.iw-lead-popup__trigger--outline:hover {
	background: #ff6b17;
	color: #fff;
}

/* ─────────────── Overlay + dialog ─────────────── */
.iw-lead-popup__overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	padding: 24px 16px;
	overflow-y: auto;
	background: rgba(17, 17, 17, .6);
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility .25s ease;
	-webkit-overflow-scrolling: touch;
}
.iw-lead-popup__overlay[hidden] {
	display: none;
}
.iw-lead-popup__overlay--open {
	opacity: 1;
	visibility: visible;
}

.iw-lead-popup__dialog {
	position: relative;
	width: 100%;
	max-width: 530px;
	margin: auto;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
	transform: translateY(-16px);
	transition: transform .25s ease;
}
.iw-lead-popup__overlay--open .iw-lead-popup__dialog {
	transform: translateY(0);
}

.iw-lead-popup__close {
	position: absolute;
	top: 8px;
	right: 8px;
	z-index: 2;
	width: 40px;
	height: 40px;
	min-height: unset;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 0;
	font-size: 28px;
	line-height: 1;
	color: #555;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
	transition: background-color .2s ease, color .2s ease;
}
.iw-lead-popup__close:hover {
	background: rgba(0, 0, 0, .06);
	color: #111;
}

.iw-lead-popup__body {
	padding: 28px 24px 24px;
}

/* Form-only bên trong: bỏ giới hạn max-width của card, để dialog điều phối. */
.iw-lead-popup__body .iw-banner-cta-form {
	max-width: none;
}

/* Khoá scroll nền khi popup mở. */
body.iw-lead-popup-lock {
	overflow: hidden;
}

@media (min-width: 850px) {
	.iw-lead-popup__overlay {
		align-items: center;
	}
	.iw-lead-popup__body {
		padding: 0px 0px 0px;
	}
	.iw-lead-popup__body form {
		margin: 0;
	}
}
