/**
 * AutomAi8 Form Embed - Public Styles
 *
 * @package AutomAi8_Form_Embed
 */

/* Form Placeholder */
.automai8-form-placeholder {
	min-height: 400px;	
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}



/* Form Wrapper */
.automai8-form-wrapper {
	position: relative;
	/* No display: flex, align-items, or justify-content to allow external script to manage height */
}

/* Iframe */
.automai8-form-iframe {
	/*width: 100%;
	height: 100%;
	border: none;
	display: block;
	position: absolute;
	top: 0;
	left: 0;*/
	transition: opacity 0.3s ease-in-out, visibility 0.3s ease-in-out;
}

/* Loading State */
.automai8-form-placeholder.loading {
	opacity: 0.7;
}

.automai8-form-placeholder.loading::after {
	content: '';
	position: absolute;
	width: 40px;
	height: 40px;
	border: 4px solid #f3f3f3;
	border-top: 4px solid #3498db;
	border-radius: 50%;
	animation: automai8-spin 1s linear infinite;
}

@keyframes automai8-spin {
	0% { transform: rotate( 0deg ); }
	100% { transform: rotate( 360deg ); }
}

/* Minimal Loading Spinner */
.automai8-loading-spinner {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate( -50%, -50% );
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10;
}

.automai8-spinner-ring {
	width: 32px;
	height: 32px;
	border: 3px solid rgba( 52, 152, 219, 0.15 );
	border-top: 3px solid #3498db;
	border-radius: 50%;
	animation: automai8-spin 1s linear infinite;
}

/* Fade In Animation for Iframe */
.automai8-form-iframe {
	animation: automai8-fade-in 0.5s ease-in;
}

@keyframes automai8-fade-in {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}
