/* Free Estimate modal chrome. The dialog shell (overlay, centering,
   scrolling) comes from Intro's Show/Hide view styles. */

.aa-fe-modal {
	position: relative;
}

/* Compact circular ✕, pinned to the dialog's top-right corner. */
.aa-fe-modal__close {
	position: absolute;
	top: 1rem;
	right: 1rem;
	margin: 0;
	z-index: 1;
}

.aa-fe-modal__close .wp-block-button__link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	padding: 0;
	border-radius: 50%;
	font-size: 1rem;
	line-height: 1;
}

/* Brand header: logo + title + subtitle left, trust badge right. */
.aa-fe-modal__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 2rem;
	padding-right: 1rem; /* breathing room from the close button side */
}

.aa-fe-modal__logo {
	display: block;
	width: 228px;
	max-width: 60vw;
	height: auto;
}

.aa-fe-modal__title {
	margin-top: 1.25rem;
}

.aa-fe-modal__subtitle {
	margin-top: 0.5rem;
	opacity: 0.85;
	max-width: 52ch;
}

.aa-fe-modal__badge {
	flex: 0 0 auto;
	width: 120px;
	height: auto;
	margin-top: 1.5rem; /* stays clear of the close button */
}

@media (max-width: 640px) {
	.aa-fe-modal__badge {
		display: none; /* keep the form above the fold on phones */
	}
}

/* Loading / error status inside the form slot. */
.aa-fe-slot__status {
	display: none;
	padding: 3rem 0;
	text-align: center;
	--intro-loader-size: 4rem;
}

.aa-fe-slot.is-loading .aa-fe-slot__status {
	display: flex;
	align-items: center;
	justify-content: center;
}

.aa-fe-slot.has-error .aa-fe-slot__status {
	display: block;
	opacity: 1;
}

/* Give the injected form a little air below the intro copy. */
.aa-fe-slot .gform_wrapper {
	margin-top: 1rem;
}
