/**
 * LHF NLHA - Entry Screening Modal Popup Styles
 * 2-column layout + Thank You confirmation box on success
 */

/* Root Overlay Wrapper (Fixed viewport popup on frontend) */
.lhf-modal-popup-wrapper {
	position: fixed !important;
	top: 0 !important;
	left: 0 !important;
	right: 0 !important;
	bottom: 0 !important;
	width: 100vw !important;
	height: 100vh !important;
	max-width: none !important;
	margin: 0 !important;
	z-index: 99999999 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 24px;
	box-sizing: border-box;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.35s ease, visibility 0.35s ease;
}

/* Active Overlay State */
.lhf-modal-popup-wrapper.lhf-modal-active {
	visibility: visible !important;
	opacity: 1 !important;
}

/* Dark Backdrop */
.lhf-modal-backdrop {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(22, 51, 62, 0.78);
	backdrop-filter: blur(5px);
	-webkit-backdrop-filter: blur(5px);
}

/* Base Modal Dialog Box (Screening Step) */
.lhf-modal-dialog {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 860px;
	background-color: #ffffff;
	border-radius: 32px;
	padding: 56px 60px 48px;
	box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 0, 0, 0.05);
	box-sizing: border-box;
	transform: scale(0.95);
	opacity: 1;
	transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
	overflow: hidden;
}

/* Hide Screening Dialog smoothly when transitioning to Thank You */
.lhf-modal-dialog.lhf-dialog-hidden {
	opacity: 0;
	transform: scale(0.9);
	pointer-events: none;
	display: none;
}

/* Close Button (X) - Styled as circular badge matching brand */
.lhf-modal-popup-wrapper .lhf-modal-close-btn,
.lhf-modal-dialog button.lhf-modal-close-btn,
.lhf-modal-thankyou-dialog button.lhf-modal-close-btn,
body .lhf-modal-popup-wrapper button.lhf-modal-close-btn {
	position: absolute !important;
	top: 20px !important;
	right: 24px !important;
	width: 36px !important;
	height: 36px !important;
	background: #ef3e36 !important;
	background-color: #ef3e36 !important;
	background-image: none !important;
	border: none !important;
	cursor: pointer !important;
	color: #ffffff !important;
	font-size: 22px !important;
	font-weight: 700 !important;
	line-height: 1 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	border-radius: 50% !important;
	transition: background-color 0.2s ease, transform 0.2s ease !important;
	padding: 0 !important;
	z-index: 15 !important;
	box-shadow: 0 2px 8px rgba(239, 62, 54, 0.35) !important;
}

.lhf-modal-popup-wrapper .lhf-modal-close-btn:hover,
.lhf-modal-dialog button.lhf-modal-close-btn:hover,
.lhf-modal-thankyou-dialog button.lhf-modal-close-btn:hover,
body .lhf-modal-popup-wrapper button.lhf-modal-close-btn:hover {
	background: #d82b23 !important;
	background-color: #d82b23 !important;
	color: #ffffff !important;
	transform: scale(1.08) !important;
}

/* Two-Column Grid Body */
.lhf-modal-body-grid {
	display: grid;
	grid-template-columns: 1.15fr 0.95fr;
	gap: 48px;
	align-items: center;
	text-align: left;
}

/* LEFT COLUMN: Headline Section */
.lhf-modal-col-headline {
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.lhf-modal-popup-wrapper .lhf-modal-dialog .lhf-modal-headline-top,
.lhf-modal-popup-wrapper .lhf-modal-dialog h1.lhf-modal-headline-top,
.lhf-modal-popup-wrapper .lhf-modal-dialog h2.lhf-modal-headline-top,
.lhf-modal-popup-wrapper .lhf-modal-dialog h3.lhf-modal-headline-top,
body .lhf-modal-popup-wrapper .lhf-modal-headline-top {
	font-family: inherit;
	font-size: 44px;
	font-weight: 900;
	line-height: 1.05;
	text-transform: uppercase;
	color: #ef3e36;
	margin: 0 0 16px 0;
	letter-spacing: -0.01em;
}

.lhf-modal-popup-wrapper .lhf-modal-dialog .lhf-modal-headline-bottom,
.lhf-modal-popup-wrapper .lhf-modal-dialog h1.lhf-modal-headline-bottom,
.lhf-modal-popup-wrapper .lhf-modal-dialog h2.lhf-modal-headline-bottom,
.lhf-modal-popup-wrapper .lhf-modal-dialog h3.lhf-modal-headline-bottom,
body .lhf-modal-popup-wrapper .lhf-modal-headline-bottom {
	font-family: inherit;
	font-size: 44px;
	font-weight: 900;
	line-height: 1.05;
	text-transform: uppercase;
	color: #0d3b4c;
	margin: 0;
	letter-spacing: -0.01em;
}

/* RIGHT COLUMN: 1-Step Selection Buttons */
.lhf-modal-col-selection {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding-left: 10px;
}

.lhf-modal-popup-wrapper .lhf-modal-dialog .lhf-modal-options-title,
body .lhf-modal-popup-wrapper .lhf-modal-options-title {
	font-family: inherit;
	font-size: 28px;
	font-weight: 900;
	text-transform: uppercase;
	line-height: 1.1;
	color: #0d3b4c;
	margin: 0 0 18px 0;
	letter-spacing: 0.02em;
}

/* Buttons List Layouts */
.lhf-modal-buttons-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 100%;
	box-sizing: border-box;
}

/* Stacked Layout */
.lhf-modal-buttons-list.lhf-layout-stacked {
	display: flex;
	flex-direction: column;
	width: 100%;
}

.lhf-modal-buttons-list.lhf-layout-stacked .lhf-modal-action-btn {
	width: 100% !important;
}

/* Inline Layout */
.lhf-modal-buttons-list.lhf-layout-inline {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	width: 100%;
}

.lhf-modal-buttons-list.lhf-layout-inline .lhf-modal-action-btn {
	width: auto !important;
	flex: 0 1 auto;
	padding: 10px 18px !important;
}

.lhf-modal-buttons-list.lhf-layout-inline .lhf-modal-action-btn::after {
	margin-left: 8px;
}

/* 2 Columns Grid Layout */
.lhf-modal-buttons-list.lhf-layout-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	width: 100%;
}

.lhf-modal-buttons-list.lhf-layout-grid .lhf-modal-action-btn {
	width: 100% !important;
}

/* 1-Step Direct Action Buttons - Reset & Default Appearance */
.lhf-modal-popup-wrapper .lhf-modal-dialog button.lhf-modal-action-btn,
.lhf-modal-popup-wrapper .lhf-modal-dialog .lhf-modal-action-btn,
body .lhf-modal-popup-wrapper button.lhf-modal-action-btn,
body .lhf-modal-popup-wrapper .lhf-modal-action-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: flex-start !important;
	width: 100% !important;
	padding: 13px 20px;
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	color: #0d3b4c;
	background: #f1f5f9;
	background-color: #f1f5f9;
	background-image: none !important;
	border: 2px solid transparent;
	border-radius: 12px;
	cursor: pointer !important;
	text-decoration: none !important;
	box-sizing: border-box !important;
	transition: all 0.22s ease !important;
	position: relative;
	text-align: left !important;
	box-shadow: none;
	outline: none;
	appearance: none;
	-webkit-appearance: none;
}

.lhf-modal-action-btn::after {
	content: '→';
	margin-left: auto;
	font-size: 18px;
	line-height: 1;
	opacity: 0.5;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

/* Hover state */
.lhf-modal-popup-wrapper .lhf-modal-dialog button.lhf-modal-action-btn:hover:not(:disabled),
.lhf-modal-popup-wrapper .lhf-modal-dialog .lhf-modal-action-btn:hover:not(:disabled),
body .lhf-modal-popup-wrapper button.lhf-modal-action-btn:hover:not(:disabled),
body .lhf-modal-popup-wrapper .lhf-modal-action-btn:hover:not(:disabled) {
	background: #ef3e36;
	background-color: #ef3e36;
	color: #ffffff;
	border-color: #ef3e36;
	transform: translateX(4px);
}

.lhf-modal-action-btn:hover:not(:disabled)::after {
	opacity: 1;
	transform: translateX(3px);
}

/* Hide arrow when disabled in widget controls */
.lhf-modal-buttons-list.no-arrow .lhf-modal-action-btn::after {
	display: none !important;
	content: none !important;
}

/* Loading Spinner state for clicked button */
.lhf-modal-buttons-list.is-processing .lhf-modal-action-btn {
	pointer-events: none !important;
	opacity: 0.6;
}

.lhf-modal-buttons-list.is-processing .lhf-modal-action-btn.is-active-btn {
	opacity: 1 !important;
	background: #0d3b4c !important;
	background-color: #0d3b4c !important;
	color: #ffffff !important;
	border-color: #0d3b4c !important;
}

.lhf-modal-buttons-list .lhf-modal-action-btn.is-active-btn::after,
.lhf-modal-buttons-list.no-arrow .lhf-modal-action-btn.is-active-btn::after {
	display: inline-block !important;
	content: '' !important;
	width: 18px !important;
	height: 18px !important;
	border: 2px solid rgba(255, 255, 255, 0.35) !important;
	border-top-color: #ffffff !important;
	border-radius: 50% !important;
	animation: lhfSpin 0.75s infinite linear !important;
	opacity: 1 !important;
	margin-left: auto !important;
}

@keyframes lhfSpin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* =========================================================================
 * THANK YOU CONFIRMATION BOX
 * ========================================================================= */

.lhf-modal-thankyou-dialog {
	position: relative;
	z-index: 3;
	width: 100%;
	max-width: 540px;
	background-color: #ffffff;
	border-radius: 28px;
	padding: 50px 40px 44px;
	box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.4);
	box-sizing: border-box;
	text-align: center;
	display: none;
	opacity: 0;
	transform: scale(0.85);
	transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Active State for Thank You Box */
.lhf-modal-thankyou-dialog.lhf-thankyou-active {
	display: block;
	opacity: 1;
	transform: scale(1);
	animation: lhfThankYouPop 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lhfThankYouPop {
	from {
		opacity: 0;
		transform: scale(0.82);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.lhf-thankyou-icon-wrap {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 72px;
	height: 72px;
	background-color: #e8f5e9;
	color: #2e7d32;
	border-radius: 50%;
	margin-bottom: 22px;
	box-shadow: 0 4px 12px rgba(46, 125, 50, 0.15);
}

.lhf-thankyou-icon-wrap svg {
	width: 38px;
	height: 38px;
	fill: currentColor;
}

.lhf-thankyou-title {
	font-family: inherit;
	font-size: 32px;
	font-weight: 800;
	line-height: 1.15;
	color: #0d3b4c;
	margin: 0 0 12px 0;
}

.lhf-thankyou-message {
	font-size: 16px;
	line-height: 1.5;
	color: #475569;
	margin: 0 0 26px 0;
}

.lhf-modal-thankyou-dialog button.lhf-thankyou-btn,
.lhf-modal-thankyou-dialog .lhf-thankyou-btn,
body .lhf-modal-popup-wrapper button.lhf-thankyou-btn,
body .lhf-modal-popup-wrapper .lhf-thankyou-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	font-family: inherit;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.2;
	color: #ffffff;
	background: #ef3e36;
	background-color: #ef3e36;
	background-image: none !important;
	border: 2px solid transparent;
	border-radius: 12px;
	padding: 13px 38px;
	cursor: pointer !important;
	text-decoration: none !important;
	box-sizing: border-box !important;
	transition: all 0.22s ease !important;
	box-shadow: 0 4px 12px rgba(239, 62, 54, 0.25);
	outline: none;
	appearance: none;
	-webkit-appearance: none;
}

.lhf-modal-thankyou-dialog button.lhf-thankyou-btn:hover,
.lhf-modal-thankyou-dialog .lhf-thankyou-btn:hover,
body .lhf-modal-popup-wrapper button.lhf-thankyou-btn:hover,
body .lhf-modal-popup-wrapper .lhf-thankyou-btn:hover {
	background: #d82b23;
	background-color: #d82b23;
	color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(239, 62, 54, 0.35);
}

/* =========================================================================
 * ENTRANCE ANIMATIONS (Screening Box)
 * ========================================================================= */

.lhf-anim-zoom.lhf-modal-active .lhf-modal-dialog:not(.lhf-dialog-hidden) {
	animation: lhfModalZoomIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lhfModalZoomIn {
	from {
		opacity: 0;
		transform: scale(0.85);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.lhf-anim-fade.lhf-modal-active .lhf-modal-dialog:not(.lhf-dialog-hidden) {
	animation: lhfModalFadeIn 0.35s ease forwards;
}

@keyframes lhfModalFadeIn {
	from { opacity: 0; }
	to { opacity: 1; }
}

.lhf-anim-slide-down.lhf-modal-active .lhf-modal-dialog:not(.lhf-dialog-hidden) {
	animation: lhfModalSlideDown 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lhfModalSlideDown {
	from {
		opacity: 0;
		transform: translateY(-50px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.lhf-anim-slide-up.lhf-modal-active .lhf-modal-dialog:not(.lhf-dialog-hidden) {
	animation: lhfModalSlideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes lhfModalSlideUp {
	from {
		opacity: 0;
		transform: translateY(50px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.lhf-anim-bounce.lhf-modal-active .lhf-modal-dialog:not(.lhf-dialog-hidden) {
	animation: lhfModalBounceIn 0.55s cubic-bezier(0.68, -0.55, 0.265, 1.55) forwards;
}

@keyframes lhfModalBounceIn {
	0% {
		opacity: 0;
		transform: scale(0.4);
	}
	60% {
		opacity: 1;
		transform: scale(1.04);
	}
	80% {
		transform: scale(0.98);
	}
	100% {
		opacity: 1;
		transform: scale(1);
	}
}

/* =========================================================================
 * RESPONSIVE (Mobile & Tablet)
 * ========================================================================= */
@media (max-width: 768px) {
	.lhf-modal-dialog {
		padding: 44px 24px 36px;
		border-radius: 24px;
		max-width: 95%;
	}

	.lhf-modal-body-grid {
		grid-template-columns: 1fr;
		gap: 28px;
		text-align: center;
	}

	.lhf-modal-popup-wrapper .lhf-modal-dialog .lhf-modal-headline-top,
	.lhf-modal-popup-wrapper .lhf-modal-dialog .lhf-modal-headline-bottom,
	.lhf-modal-headline-top,
	.lhf-modal-headline-bottom {
		font-size: 30px;
	}

	.lhf-modal-popup-wrapper .lhf-modal-dialog .lhf-modal-options-title,
	.lhf-modal-options-title {
		font-size: 24px;
		margin-bottom: 14px;
		text-align: center;
	}

	.lhf-modal-col-selection {
		padding-left: 0;
		align-items: center;
	}

	.lhf-modal-popup-wrapper .lhf-modal-dialog button.lhf-modal-action-btn,
	.lhf-modal-action-btn {
		justify-content: center !important;
		text-align: center !important;
	}

	.lhf-modal-action-btn::after {
		margin-left: 10px;
	}

	.lhf-modal-thankyou-dialog {
		padding: 40px 24px 32px;
		border-radius: 20px;
		max-width: 92%;
	}

	.lhf-thankyou-title {
		font-size: 26px;
	}

	.lhf-modal-thankyou-dialog button.lhf-thankyou-btn,
	.lhf-thankyou-btn {
		width: 100% !important;
	}
}

/* =========================================================================
 * ELEMENTOR EDITOR PREVIEW MODE (Applied ONLY inside Elementor Editor)
 * ========================================================================= */
.elementor-editor-active .lhf-modal-popup-wrapper.preview-in-editor,
.elementor-edit-mode .lhf-modal-popup-wrapper.preview-in-editor {
	position: relative !important;
	top: auto !important;
	left: auto !important;
	width: 100% !important;
	height: auto !important;
	min-height: 480px;
	visibility: visible !important;
	opacity: 1 !important;
	z-index: 10 !important;
	padding: 40px 15px;
	display: flex !important;
	align-items: center;
	justify-content: center;
	background: rgba(13, 59, 76, 0.04);
	border-radius: 16px;
}

.elementor-editor-active .lhf-modal-popup-wrapper.preview-in-editor .lhf-modal-backdrop,
.elementor-edit-mode .lhf-modal-popup-wrapper.preview-in-editor .lhf-modal-backdrop {
	display: none;
}

.elementor-editor-active .lhf-modal-popup-wrapper.preview-in-editor .lhf-modal-dialog,
.elementor-edit-mode .lhf-modal-popup-wrapper.preview-in-editor .lhf-modal-dialog {
	margin: 0 auto;
}

.elementor-editor-active .lhf-modal-popup-wrapper.preview-thankyou .lhf-modal-dialog,
.elementor-edit-mode .lhf-modal-popup-wrapper.preview-thankyou .lhf-modal-dialog {
	display: none;
}

.elementor-editor-active .lhf-modal-popup-wrapper.preview-thankyou .lhf-modal-thankyou-dialog,
.elementor-edit-mode .lhf-modal-popup-wrapper.preview-thankyou .lhf-modal-thankyou-dialog {
	display: block;
	opacity: 1;
	transform: scale(1);
	margin: 0 auto;
}
