.amg-listing-embed {
	--amg-blue: #094596;
	--amg-navy: #10223a;
	--amg-red: #d61318;
	--amg-border: #d9e0e8;
	--amg-muted: #53657a;
	width: 100%;
	margin: 0 auto;
	color: var(--amg-navy);
}

.amg-listing-embed__status {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	min-height: 3rem;
	padding: 0.75rem 1rem;
	border: 1px solid var(--amg-border);
	border-bottom: 0;
	border-radius: 12px 12px 0 0;
	background: #eef4fb;
	font-size: 0.95rem;
	font-weight: 600;
}

.amg-listing-embed.is-loaded .amg-listing-embed__status {
	display: none;
}

.amg-listing-embed__spinner {
	width: 1rem;
	height: 1rem;
	border: 2px solid rgba(9, 69, 150, 0.25);
	border-top-color: var(--amg-blue);
	border-radius: 50%;
	animation: amg-listing-spin 0.8s linear infinite;
}

.amg-listing-embed__navigation[hidden] {
	display: none;
}

.amg-listing-embed__navigation {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding: 0 0 0.65rem;
}

.amg-listing-embed__back {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.45rem;
	min-height: 40px;
	padding: 0.55rem 0.85rem;
	border: 2px solid var(--amg-blue);
	border-radius: 5px;
	color: #fff;
	background: var(--amg-blue);
	font: inherit;
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
}

.amg-listing-embed__back:hover,
.amg-listing-embed__back:focus-visible {
	border-color: var(--amg-navy);
	background: var(--amg-navy);
}

.amg-listing-embed__back:disabled {
	cursor: wait;
	opacity: 0.65;
}

.amg-listing-embed__viewport {
	position: relative;
	height: var(--amg-listing-height, 1200px);
	overflow: hidden;
	border: 1px solid var(--amg-border);
	border-radius: 12px;
	background: #fff;
	box-shadow: 0 10px 30px rgba(16, 34, 58, 0.08);
}

.amg-listing-embed:not(.is-loaded) .amg-listing-embed__viewport {
	border-radius: 0 0 12px 12px;
}

.amg-listing-embed__frame {
	display: block;
	width: 100%;
	height: calc(var(--amg-listing-height, 1200px) + var(--amg-listing-crop, 145px));
	margin: 0;
	border: 0;
	transform: translateY(calc(-1 * var(--amg-listing-crop, 145px)));
	background: #fff;
}

.amg-listing-embed__footer {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem;
	padding: 1rem 0 0;
}

.amg-listing-embed__footer p {
	max-width: 820px;
	margin: 0;
	color: var(--amg-muted);
	font-size: 0.85rem;
	line-height: 1.55;
}

.amg-listing-embed__fallback {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	padding: 0.7rem 1rem;
	border: 2px solid var(--amg-blue);
	border-radius: 5px;
	color: var(--amg-blue);
	background: #fff;
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
}

.amg-listing-embed__fallback:hover,
.amg-listing-embed__fallback:focus-visible {
	color: #fff;
	background: var(--amg-blue);
}

.amg-listing-embed__error {
	padding: 1rem;
	border-left: 4px solid var(--amg-red);
	background: #fff2f2;
}

@media (max-width: 767px) {
	.amg-listing-embed__back {
		width: 100%;
	}

	.amg-listing-embed__viewport {
		height: var(--amg-listing-mobile-height, 1200px);
		border-radius: 8px;
	}

	.amg-listing-embed__frame {
		height: calc(var(--amg-listing-mobile-height, 1200px) + var(--amg-listing-mobile-crop, 80px));
		transform: translateY(calc(-1 * var(--amg-listing-mobile-crop, 80px)));
	}

	.amg-listing-embed__footer {
		align-items: stretch;
		flex-direction: column;
	}

	.amg-listing-embed__fallback {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.amg-listing-embed__spinner {
		animation: none;
	}
}

@keyframes amg-listing-spin {
	to {
		transform: rotate(360deg);
	}
}
