/**
 * Popup form CTA
 * ---------------------------------------------------------------------------
 * Bám theo ngôn ngữ thiết kế sẵn có của bản Webflow: pill bo 100rem, xanh
 * --_brand---dark-blue, hover chuyển --_brand---dark-green, transition .3s.
 * Tự viết thay vì dùng lightbox Webflow/Flatsome vì cả hai đều không phù hợp
 * (một cái chỉ làm ảnh–video, một cái đã bị gỡ CSS/JS trên trang này).
 */

/* ------------------------------------------------------------------ */
/* Khung popup                                                         */
/* ------------------------------------------------------------------ */

.wl-modal[hidden] {
	display: none;
}

.wl-modal {
	z-index: 10000;
	justify-content: center;
	align-items: center;
	padding: 1.5rem;
	position: fixed;
	inset: 0;
	display: flex;
}

.wl-modal__backdrop {
	background-color: #0b1c3acc;   /* --midnight-blue, 80% */
	position: absolute;
	inset: 0;
	animation: wl-modal-fade .25s ease both;
}

.wl-modal__dialog {
	background-color: #fff;
	border-radius: 1.25rem;
	width: 100%;
	max-width: 34rem;
	max-height: calc(100vh - 3rem);
	padding: 2.5rem;
	position: relative;
	overflow-y: auto;
	box-shadow: 0 1.5rem 4rem #0b1c3a40;
	animation: wl-modal-rise .28s cubic-bezier(.16, 1, .3, 1) both;
}

@keyframes wl-modal-fade {
	from { opacity: 0; }
	to   { opacity: 1; }
}

@keyframes wl-modal-rise {
	from { opacity: 0; transform: translateY(1.5rem) scale(.98); }
	to   { opacity: 1; transform: none; }
}

/* Người dùng chọn giảm chuyển động thì bỏ animation. */
@media (prefers-reduced-motion: reduce) {
	.wl-modal__backdrop,
	.wl-modal__dialog {
		animation: none;
	}
}

.wl-modal__close {
	color: var(--_brand---dark-grey);
	cursor: pointer;
	background-color: var(--_brand---light-grey);
	border: 0;
	border-radius: 100rem;
	justify-content: center;
	align-items: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	transition: all .3s;
	display: flex;
	position: absolute;
	top: 1.25rem;
	right: 1.25rem;
}

.wl-modal__close:hover {
	background-color: var(--_brand---dark-green);
	color: #fff;
}

.wl-modal__head {
	margin-bottom: 1.75rem;
	padding-right: 2.5rem;   /* chừa chỗ cho nút đóng */
}

.wl-modal__title {
	color: var(--_brand---dark-grey);
	letter-spacing: -.02em;
	margin: 0 0 .5rem;
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.25em;
}

.wl-modal__subtitle {
	color: #5a5a5a;
	margin: 0;
	font-size: 1rem;
	line-height: 1.55em;
}

/* ------------------------------------------------------------------ */
/* Form bên trong                                                      */
/* ------------------------------------------------------------------ */

/*
 * Kiểu của .wl-form / .wl-field / .wl-submit và các thông báo CF7 đã chuyển
 * sang assets/form.css để trang /contact/ dùng chung. File này enqueue với
 * form.css làm phụ thuộc nên thứ tự nạp vẫn như cũ.
 */


/* ------------------------------------------------------------------ */
/* Khoá cuộn nền khi popup mở                                          */
/* ------------------------------------------------------------------ */

html.wl-modal-open,
html.wl-modal-open body {
	overflow: hidden;
}

/* ------------------------------------------------------------------ */
/* Màn hình nhỏ: popup trượt lên từ đáy, chiếm gần hết chiều cao        */
/* ------------------------------------------------------------------ */

@media (max-width: 640px) {
	.wl-modal {
		align-items: flex-end;
		padding: 0;
	}

	.wl-modal__dialog {
		border-radius: 1.25rem 1.25rem 0 0;
		max-width: none;
		max-height: 92vh;
		padding: 2rem 1.25rem 1.5rem;
	}

	/* .wl-form-grid xuống 1 cột: rule nằm ở assets/form.css. */

	.wl-modal__title {
		font-size: 1.5rem;
	}

	@keyframes wl-modal-rise {
		from { opacity: 0; transform: translateY(100%); }
		to   { opacity: 1; transform: none; }
	}
}
