/* eb5inc.com — lead modal on a native <dialog> (focus trap, Escape and focus
   return come from the browser and eb5inc.js). Content is the HFE block
   "EB5Inc · Lead modal": three intent heads (.lm-head.lm-info / .lm-docs /
   .lm-call), the Fluent Form, and the switch to "Schedule a call". */

.modal {
	width: min(560px, calc(100% - 48px)); max-height: calc(100vh - 48px); overflow: auto;
	border: 0; border-radius: 8px; box-shadow: 0 24px 64px rgba(10, 32, 51, .35);
	padding: 36px; color: var(--eb-text); background: #FFFFFF;
}
.modal::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 2px; background: var(--eb-accent); }
.modal::backdrop { background: rgba(10, 32, 51, .62); }
.modal > .elementor,
.modal > .elementor > .e-con { position: static; } /* so the close button anchors to the dialog corner */

/* Close button: Button widget with class .modal-x, text kept for screen readers. */
.modal .modal-x { position: absolute; top: 12px; right: 12px; width: auto; z-index: 2; }
.modal .modal-x .elementor-button { width: 44px; height: 44px; padding: 0; display: flex; align-items: center; justify-content: center; }

/* Only the head that matches the intent is shown. */
.modal .lm-head { display: none; }
.modal[data-intent="info"] .lm-info,
.modal[data-intent="docs"] .lm-docs,
.modal[data-intent="call"] .lm-call { display: flex; }
.modal .lm-head .elementor-heading-title { padding-right: 40px; }
.modal[data-intent="call"] .lm-callswitch { display: none; }
.modal .lm-cta { display: none; } /* submit-button text per intent, read by eb5inc.js */
.modal.is-done .lm-head,
.modal.is-done .lm-callswitch,
.modal.is-done .lm-after-form,
.modal.is-done .lm-review { display: none; }

/* Below 600px: bottom sheet. */
@media (max-width: 600px) {
	.modal {
		width: 100%; max-width: none; max-height: 92vh; margin: auto 0 0;
		border-radius: 12px 12px 0 0; padding: 28px 20px;
	}
}
