/* ── Product Demo Animation ── */

/* Container */
#amp-product-demo {
	display: flex;
	justify-content: center;
	padding: 1.25rem 0 2.5rem;
}

/* Browser frame */
.amp-demo-browser {
	width: 100%;
	max-width: 960px;
	background: #F8F8F6;
	border-radius: 12px;
	box-shadow:
		0 4px 24px rgba(0, 0, 0, 0.08),
		0 1px 3px rgba(0, 0, 0, 0.04);
	overflow: hidden;
	font-family: Inter, system-ui, -apple-system, sans-serif;
	position: relative;
}

/* Browser toolbar */
.amp-demo-toolbar {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	padding: 0.65rem 1rem;
	background: #F0F0EC;
	border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.amp-demo-dots {
	display: flex;
	gap: 6px;
	flex-shrink: 0;
}

.amp-demo-dots span {
	width: 10px;
	height: 10px;
	border-radius: 50%;
	background: rgba(0, 0, 0, 0.1);
}

.amp-demo-url {
	flex: 1;
	background: #ffffff;
	border-radius: 6px;
	padding: 0.35rem 0.75rem;
	font-size: 0.75rem;
	color: #6B7280;
	border: 1px solid rgba(0, 0, 0, 0.06);
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

/* Dashboard */
.amp-demo-dashboard {
	padding: 1.25rem;
}

/* Hero banner */
.amp-demo-hero {
	display: flex;
	align-items: center;
	gap: 1rem;
	background: #FFFDE7;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 10px;
	padding: 1rem 1.25rem;
	margin-bottom: 1rem;
	opacity: 0;
	transform: translateY(6px);
	transition: opacity 0.4s ease, transform 0.4s ease;
}

.amp-demo-hero.visible {
	opacity: 1;
	transform: translateY(0);
}

.amp-demo-hero-avatar {
	width: 52px;
	height: 52px;
	flex-shrink: 0;
}

.amp-demo-hero-avatar svg {
	width: 100%;
	height: 100%;
}

.amp-demo-hero-content {
	flex: 1;
}

.amp-demo-hero-title {
	font-size: 0.95rem;
	font-weight: 700;
	color: #000000;
	line-height: 1.3;
	margin-bottom: 0.25rem;
}

.amp-demo-hero-number {
	font-weight: 800;
}

.amp-demo-hero-meta {
	display: flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.7rem;
	color: #6B7280;
	margin-bottom: 0.25rem;
}

.amp-demo-hero-change {
	font-weight: 600;
	padding: 0.1rem 0.35rem;
	border-radius: 4px;
	font-size: 0.65rem;
}

.amp-demo-hero-change.up {
	color: #16a34a;
	background: rgba(22, 163, 74, 0.08);
}

.amp-demo-hero-change.down {
	color: #dc2626;
	background: rgba(220, 38, 38, 0.08);
}

.amp-demo-hero-dot {
	color: #9CA3AF;
}

.amp-demo-hero-desc {
	font-size: 0.65rem;
	color: #9CA3AF;
	line-height: 1.3;
}

/* Cards rows */
.amp-demo-cards-row {
	display: flex;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.amp-demo-cards-row:last-child {
	margin-bottom: 0;
}

/* Cards */
.amp-demo-card {
	flex: 1;
	background: #ffffff;
	border: 1px solid rgba(0, 0, 0, 0.06);
	border-radius: 10px;
	padding: 0.85rem 1rem;
	text-align: center;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.35s ease, transform 0.35s ease;
}

.amp-demo-card.visible {
	opacity: 1;
	transform: translateY(0);
}

/* Top cards: big number, label below */
.amp-demo-card-top .amp-demo-card-value {
	font-size: 1.75rem;
	font-weight: 800;
	color: #000000;
	line-height: 1.2;
	margin-bottom: 0.15rem;
}

.amp-demo-card-top .amp-demo-card-label {
	font-size: 0.65rem;
	color: #6B7280;
	font-weight: 500;
	margin-bottom: 0.3rem;
}

/* Bottom cards: label on top, number below */
.amp-demo-card-bottom .amp-demo-card-label-top {
	font-size: 0.65rem;
	color: #6B7280;
	font-weight: 500;
	margin-bottom: 0.2rem;
}

.amp-demo-card-bottom .amp-demo-card-value {
	font-size: 1.5rem;
	font-weight: 800;
	color: #000000;
	line-height: 1.2;
	margin-bottom: 0.2rem;
}

/* Change indicator */
.amp-demo-card-change {
	font-size: 0.6rem;
	font-weight: 600;
	margin-bottom: 0.15rem;
}

.amp-demo-card-change.up {
	color: #16a34a;
}

.amp-demo-card-change.down {
	color: #dc2626;
}

/* Sub text */
.amp-demo-card-sub {
	font-size: 0.58rem;
	color: #9CA3AF;
	font-weight: 400;
}

/* Fade for loop */
.amp-demo-browser.fading {
	animation: amp-demo-fade-out 0.8s ease forwards;
}

@keyframes amp-demo-fade-out {
	to {
		opacity: 0;
		transform: translateY(10px);
	}
}

.amp-demo-browser.fading-in {
	animation: amp-demo-fade-in 0.6s ease forwards;
}

@keyframes amp-demo-fade-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Responsive */
@media (max-width: 768px) {
	.amp-demo-browser {
		border-radius: 10px;
	}

	.amp-demo-dashboard {
		padding: 0.75rem;
	}

	.amp-demo-cards-row {
		flex-wrap: wrap;
		gap: 0.5rem;
	}

	.amp-demo-card {
		flex: 1 1 calc(50% - 0.25rem);
		min-width: calc(50% - 0.25rem);
		padding: 0.6rem 0.75rem;
	}

	.amp-demo-card-top .amp-demo-card-value {
		font-size: 1.35rem;
	}

	.amp-demo-card-bottom .amp-demo-card-value {
		font-size: 1.15rem;
	}

	.amp-demo-hero {
		flex-direction: column;
		text-align: center;
		padding: 0.75rem 1rem;
		gap: 0.6rem;
	}

	.amp-demo-hero-title {
		font-size: 0.85rem;
	}

	.amp-demo-hero-meta {
		justify-content: center;
		flex-wrap: wrap;
	}

	.amp-demo-hero-desc {
		font-size: 0.6rem;
	}

	.amp-demo-stats-row {
		margin-bottom: 0.75rem;
	}
}

@media (max-width: 480px) {
	.amp-demo-card {
		flex: 1 1 100%;
		min-width: 100%;
	}

	.amp-demo-toolbar {
		padding: 0.5rem 0.75rem;
	}

	.amp-demo-url {
		font-size: 0.65rem;
	}
}
