/* ===========================================================
   Sticky add-to-cart bar (shortcodes/sticky-atc)
   Fixed to the bottom of product pages; shown once every buy box
   has scrolled away, hidden again over the footer.
   =========================================================== */

.kw-sticky-atc{
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 999;
	padding: 10px 16px calc(10px + env(safe-area-inset-bottom, 0px));
	background: #fff;
	border-top: 1px solid #ECEFF1;
	font-family: Lato, sans-serif;

	opacity: 0;
	transform: translateY(12px);
	pointer-events: none;
	transition: opacity 250ms ease-out, transform 250ms ease-out;
}

.kw-sticky-atc.is-visible{
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

/* Leaving is quicker than arriving */
.kw-sticky-atc.is-leaving{
	transition-duration: 200ms;
}

.kw-sticky-atc__inner{
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 16px;
}

/* ---------- Prices ---------- */

.kw-sticky-atc__prices{
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.kw-sticky-atc p{
	margin: 0;
}

.kw-sticky-atc__price{
	color: #1B1B1B;
	font-size: 20px;
	font-weight: 900;
	line-height: 24px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

.kw-sticky-atc__save{
	color: #B84E63;
	font-size: 13px;
	line-height: 16px;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/* ---------- Button ---------- */

.kw-sticky-atc .kw-sticky-atc__btn{
	flex: 1 1 0;
	min-width: 0;
	max-width: 240px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	height: 52px;
	min-height: 52px;
	margin: 0;
	padding: 0 16px;
	border: 0;
	border-radius: 16px !important;
	background: #42575F;
	color: #fff;
	font-family: Lato, sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	box-shadow: none;
	transition: background-color 150ms ease-out, transform 150ms ease-out;
}

.kw-sticky-atc .kw-sticky-atc__btn:hover{
	background: #32444B;
	color: #fff;
}

.kw-sticky-atc .kw-sticky-atc__btn:active{
	transform: scale(0.98);
}

.kw-sticky-atc .kw-sticky-atc__btn:focus-visible{
	outline: 3px solid #42575F;
	outline-offset: 2px;
}

.kw-sticky-atc .kw-sticky-atc__btn[disabled]{
	opacity: 0.6;
	cursor: default;
}

.kw-sticky-atc__icon{
	flex: none;
	display: block;
}

/* One icon at a time: arrow when the button scrolls to the quantity cards, cart when it adds */
.kw-sticky-atc__icon--choose,
.kw-sticky-atc.is-choose .kw-sticky-atc__icon--cart{
	display: none;
}

.kw-sticky-atc.is-choose .kw-sticky-atc__icon--choose{
	display: block;
}

.kw-sticky-atc__label{
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

/* ---------- Busy (same 16px ring as Flatsome's .button.loading) ---------- */

.kw-sticky-atc .kw-sticky-atc__btn.is-busy{
	position: relative;
	opacity: 1;
	pointer-events: none;
}

.kw-sticky-atc__btn.is-busy .kw-sticky-atc__icon,
.kw-sticky-atc__btn.is-busy .kw-sticky-atc__label{
	visibility: hidden;
}

.kw-sticky-atc__btn.is-busy::after{
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 16px;
	margin: -8px 0 0 -8px;
	border: 2px solid #fff;
	border-top-color: transparent;
	border-right-color: transparent;
	border-radius: 50%;
	animation: spin .5s linear infinite;
}

/* ---------- The bar replaces the old floating "Želim pomoč" button ---------- */

body.kw-sticky-atc-on div:has(> .floating-button){
	display: none !important;
}

/* ---------- Keep the CookieYes "cookie settings" button above the bar ---------- */

.cky-btn-revisit-wrapper{
	transition: transform 250ms ease-out;
}

body.kw-sticky-atc-shown .cky-btn-revisit-wrapper{
	transform: translateY(calc(-1 * var(--kw-sticky-atc-h, 73px)));
}

/* Klaviyo "-10%" teaser sits bottom-right: keep it above the bar too */
body.kw-sticky-atc-shown [class*="kl-teaser-"]{
	bottom: var(--kw-sticky-atc-h, 73px) !important;
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce){
	.kw-sticky-atc,
	.kw-sticky-atc .kw-sticky-atc__btn,
	.cky-btn-revisit-wrapper{
		transition: none;
	}
	.kw-sticky-atc{
		transform: none;
	}
	.kw-sticky-atc .kw-sticky-atc__btn:active{
		transform: none;
	}
	.kw-sticky-atc__btn.is-busy::after{
		display: none;
	}
	.kw-sticky-atc__btn.is-busy .kw-sticky-atc__icon,
	.kw-sticky-atc__btn.is-busy .kw-sticky-atc__label{
		visibility: visible;
	}
	.kw-sticky-atc__btn.is-busy .kw-sticky-atc__label::after{
		content: "…";
	}
}
