/**
 * PokeStasch - sticky kopknapp pa produktsidan (mobil).
 * Dold pa desktop (>768px). Samma bottenplacering och skugga som
 * pokestasch-sticky-checkout-bar sa de tva raderna kanns som en familj.
 */

.pokestasch-buy-bar {
	display: none;
}

@media (max-width: 768px) {
	.pokestasch-buy-bar {
		display: flex;
		align-items: center;
		justify-content: space-between;
		gap: 12px;
		position: fixed;
		left: 0;
		right: 0;
		bottom: env(safe-area-inset-bottom, 0px);
		background: #ffffff;
		padding: 10px 14px;
		box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.12);
		z-index: 999997;
		opacity: 0;
		transform: translateY(100%);
		pointer-events: none;
		transition: opacity 0.25s ease, transform 0.25s ease;
	}

	.pokestasch-buy-bar.is-visible {
		opacity: 1;
		transform: translateY(0);
		pointer-events: auto;
	}

	.pokestasch-buy-bar__price {
		font-size: 15px;
		font-weight: 700;
		color: #1a1a1a;
		white-space: nowrap;
	}

	.pokestasch-buy-bar__button {
		flex-shrink: 0;
		background: #111111;
		color: #ffffff;
		font-size: 14px;
		font-weight: 700;
		border: none;
		padding: 12px 20px;
		border-radius: 999px;
		white-space: nowrap;
		cursor: pointer;
	}

	.pokestasch-buy-bar__button:active {
		transform: scale(0.98);
	}

	/* Nar kopknappsraden ar synlig pa en produktsida ska sticky
	   "Till kassan"-raden halla sig undan - annars staplas tva rader. */
	body.pokestasch-buybar-active .pokestasch-checkout-bar {
		display: none !important;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pokestasch-buy-bar {
		transition: opacity 0.15s ease;
		transform: none;
	}
}
