/**
 * Mobile sticky buy bar (T20.3).
 */

.po-sticky-buy {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: calc(var(--po-z-header, 50) - 4);
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-height: 4.25rem;
	padding: 0.65rem 1rem calc(0.65rem + env(safe-area-inset-bottom, 0px));
	border-top: 1px solid var(--po-color-border);
	background: color-mix(in srgb, var(--po-color-surface) 92%, #000);
	box-shadow: 0 -10px 28px color-mix(in srgb, #000 35%, transparent);
}

.po-sticky-buy[hidden] {
	display: none;
}

.po-sticky-buy__copy {
	display: grid;
	flex: 1 1 auto;
	gap: 0.15rem;
	min-width: 0;
}

.po-sticky-buy__title,
.po-sticky-buy__state {
	margin: 0;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.po-sticky-buy__title {
	font-size: 0.82rem;
	font-weight: 800;
}

.po-sticky-buy__price {
	font-size: 0.92rem;
	font-weight: 800;
}

.po-sticky-buy__price del {
	margin-right: 0.35rem;
	color: var(--po-color-muted);
	font-weight: 600;
}

.po-sticky-buy__state {
	color: var(--po-color-muted);
	font-size: 0.68rem;
}

.po-sticky-buy__cta {
	flex: 0 0 auto;
	min-width: 8.5rem;
	max-width: 42%;
}

.po-sticky-buy__cta:focus-visible {
	outline: 3px solid var(--po-color-cyan);
	outline-offset: 3px;
}

body.po-sticky-buy-on {
	padding-bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
}

@media (min-width: 821px) {
	.po-sticky-buy {
		display: none;
	}

	body.po-sticky-buy-on {
		padding-bottom: 0;
	}
}

@media (max-width: 430px) {
	.po-sticky-buy {
		gap: 0.55rem;
		padding-inline: 0.75rem;
	}

	.po-sticky-buy__cta {
		min-width: 7.25rem;
		padding-inline: 0.7rem;
		font-size: 0.82rem;
	}
}

@media (max-width: 360px) {
	.po-sticky-buy__title {
		font-size: 0.76rem;
	}

	.po-sticky-buy__cta {
		min-width: 6.75rem;
		max-width: 46%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.po-sticky-buy {
		transition: none;
	}
}
