/* Plavajoči gumb košarice spodaj desno (inc/kosarica-fab.php) — po zgledu kovinar-trgovina.si */
.ew-fab {
	position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); z-index: 99970;
	display: inline-flex; align-items: center; gap: 12px; min-height: 56px; padding: 6px 18px 6px 6px;
	background: var(--wp--preset--color--polnoc); color: var(--wp--preset--color--mint, #E9FFEF); border-radius: 999px; text-decoration: none;
	font-weight: 700; font-size: 1rem; line-height: 1; letter-spacing: .12em; text-transform: uppercase; font-family: var(--wp--preset--font-family--mono, ui-monospace, monospace); font-weight: 600;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--limeta) 55%, transparent); box-shadow: 0 6px 20px rgb(2 10 4 / .45), 0 0 18px -6px color-mix(in srgb, var(--wp--preset--color--limeta) 60%, transparent); transition: transform .2s ease, box-shadow .2s ease, visibility .15s;
}
.ew-fab:hover, .ew-fab:focus-visible { color: var(--wp--preset--color--limeta); transform: scale(1.05); border-color: var(--wp--preset--color--limeta); box-shadow: 0 10px 26px rgb(2 10 4 / .5), 0 0 0 1px var(--wp--preset--color--limeta), 0 0 28px -4px color-mix(in srgb, var(--wp--preset--color--limeta) 70%, transparent); }
.ew-fab:focus-visible { outline: 3px solid var(--wp--preset--color--oranzna); outline-offset: 3px; }
.ew-fab__ico { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--wp--preset--color--limeta); color: var(--wp--preset--color--polnoc); }
.ew-fab__count { min-width: 1.6em; padding: 3px 8px; border-radius: 999px; background: var(--wp--preset--color--mint, #E9FFEF); color: var(--wp--preset--color--polnoc); font-family: var(--wp--preset--font-family--mono, ui-monospace, monospace); font-size: .85rem; letter-spacing: 0; text-align: center; }
.ew-fab__count[hidden] { display: none; }
.ew-fab.ew-bump { animation: ew-fab-bump .45s ease; }
@keyframes ew-fab-bump { 40% { transform: scale(1.14); } }
/* Mobilno: samo ikona + število; nad lepljivo vrstico nakupa na strani izdelka. */
@media (max-width: 767px) {
	.ew-fab { gap: 8px; padding-right: 10px; }
	.ew-fab__lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	.single-product .ew-fab { bottom: calc(96px + env(safe-area-inset-bottom)); }
}
/* Obvestilo »dodano v košarico« nad gumbom, ne pod njim. */
body:has(.ew-fab) .ew-toast { bottom: calc(88px + env(safe-area-inset-bottom)); }
/* Ob odprti pasici piškotkov gumb skrij. */
body:has(#ew-cookie:not([hidden])) .ew-fab { visibility: hidden; }
@media print { .ew-fab { display: none; } }
@media (prefers-reduced-motion: reduce) { .ew-fab { transition: none; } .ew-fab:hover { transform: none; } .ew-fab.ew-bump { animation: none; } }
/* 2.2.0: na izdelku (telefon) FAB manjši in nad lepljivo vrstico; na strani košarice/blagajne ga ne potrebujemo. */
@media (max-width: 767px) {
	.single-product .ew-fab { min-height: 48px; padding: 4px 8px 4px 4px; }
	.single-product .ew-fab__ico { width: 40px; height: 40px; }
}
body.woocommerce-cart .ew-fab, body.woocommerce-checkout .ew-fab { display: none; }

/* M2 mobilno (skupni BP 782): kompaktni FAB tudi 768–781 px; brez lepljive vrstice ostane spodaj; na dotik brez »hover« povečave. */
@media (max-width: 781px) {
	.ew-fab { gap: 8px; padding-right: 10px; right: max(12px, env(safe-area-inset-right)); bottom: calc(12px + env(safe-area-inset-bottom)); }
	.ew-fab__lbl { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
	body.single-product:has(.ew-sticky-buy) .ew-fab { bottom: calc(96px + env(safe-area-inset-bottom)); }
	body.single-product:not(:has(.ew-sticky-buy)) .ew-fab { bottom: calc(12px + env(safe-area-inset-bottom)); }
}
@media (hover: none) { .ew-fab:hover { transform: none; } }
