/*
 * Pasek zakupu pojawiający się po dodaniu produktu bez przeładowania strony.
 * Bez niego klient zostaje na karcie produktu z samym komunikatem „dodano”
 * i musi sam odnaleźć drogę do koszyka.
 */

.iwcd-sticky-buy {
	position: fixed;
	right: 0;
	bottom: 0;
	left: 0;
	z-index: 9999;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
	background: #050505;
	color: #fff;
	border-top: 1px solid #050505;
	box-shadow: 0 -8px 24px rgba(5, 5, 5, .18);
	transform: translateY(110%);
	transition: transform .28s ease;
}

.iwcd-sticky-buy[hidden] {
	display: none !important;
}

.iwcd-sticky-buy.is-visible {
	transform: translateY(0);
}

.iwcd-sticky-buy__summary {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.iwcd-sticky-buy__label {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .1em;
	line-height: 1.2;
	text-transform: uppercase;
	color: #b9b9b9;
}

.iwcd-sticky-buy__total {
	font-size: 15px;
	font-weight: 700;
	line-height: 1.25;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.iwcd-sticky-buy__action {
	flex: 0 0 auto;
	min-height: 46px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0 20px;
	border: 1px solid #fff;
	border-radius: 0;
	background: #fff;
	color: #050505;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .08em;
	line-height: 1;
	text-transform: uppercase;
	text-decoration: none;
}

.iwcd-sticky-buy__action:hover,
.iwcd-sticky-buy__action:focus-visible {
	background: transparent;
	color: #fff;
}

.iwcd-sticky-buy__action::after {
	content: "→";
}

.iwcd-sticky-buy__close {
	position: absolute;
	top: 4px;
	right: 6px;
	padding: 4px 8px;
	border: 0;
	background: transparent;
	color: #b9b9b9;
	font-size: 16px;
	line-height: 1;
	cursor: pointer;
}

.iwcd-sticky-buy__close:hover,
.iwcd-sticky-buy__close:focus-visible {
	color: #fff;
}

@media (max-width: 480px) {
	.iwcd-sticky-buy {
		gap: 12px;
		padding-right: 12px;
		padding-left: 12px;
	}

	.iwcd-sticky-buy__action {
		padding: 0 14px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.iwcd-sticky-buy {
		transition: none;
	}
}
