/* ==========================================================================
   Unicorn Elementor Blocks — Cart widget
   Cart-icon button + live count badge that toggles the mini-cart popover.
   All selectors scoped under .ueb-cart-widget.
   ========================================================================== */

.ueb-cart-widget {
	--ueb-cart-icon-color: #1b1c19;
	--ueb-cart-icon-hover: #3a124d;
	--ueb-cart-icon-size: 20px;
	--ueb-cart-hit: 40px;
	--ueb-cart-badge-bg: #3a124d;
	--ueb-cart-badge-color: #ffffff;
	--ueb-cart-badge-size: 18px;
	--ueb-cart-badge-font: 11px;

	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--ueb-cart-hit);
	height: var(--ueb-cart-hit);
	padding: 0;
	border: 0;
	background: none;
	color: var(--ueb-cart-icon-color);
	text-decoration: none;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: color 0.18s ease;
}

.ueb-cart-widget *,
.ueb-cart-widget *::before,
.ueb-cart-widget *::after {
	box-sizing: border-box;
}

/* Re-assert color on hover/focus — the theme repaints bare links/buttons. */
.ueb-cart-widget:hover,
.ueb-cart-widget:focus,
.ueb-cart-widget:focus-visible,
.ueb-cart-widget:active {
	color: var(--ueb-cart-icon-hover);
	background: none;
	text-decoration: none;
	outline: none;
}

.ueb-cart-widget:focus-visible {
	outline: 2px solid var(--ueb-cart-icon-hover);
	outline-offset: 2px;
	border-radius: 8px;
}

/* --------------------------------------------------------------------------
   Icon
   -------------------------------------------------------------------------- */
.ueb-cart-widget__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--ueb-cart-icon-size);
	height: var(--ueb-cart-icon-size);
	color: inherit;
}

.ueb-cart-widget__icon svg {
	display: block;
	width: 100%;
	height: 100%;
	color: inherit;
	fill: currentColor;
}

/* --------------------------------------------------------------------------
   Count badge — pinned to the top-right of the icon
   -------------------------------------------------------------------------- */
.ueb-cart-widget__count {
	position: absolute;
	top: calc(50% - var(--ueb-cart-icon-size) / 2 - var(--ueb-cart-badge-size) / 3);
	left: calc(50% + var(--ueb-cart-icon-size) / 2 - var(--ueb-cart-badge-size) / 2.4);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: var(--ueb-cart-badge-size);
	height: var(--ueb-cart-badge-size);
	padding: 0 5px;
	border-radius: 999px;
	background: var(--ueb-cart-badge-bg);
	color: var(--ueb-cart-badge-color);
	font-size: var(--ueb-cart-badge-font);
	font-weight: 700;
	line-height: 1;
	letter-spacing: -0.02em;
	font-variant-numeric: tabular-nums;
	pointer-events: none;
}

/* Empty cart — hidden by default, unless the widget opted to show "0". */
.ueb-cart-widget__count.is-empty {
	display: none;
}

.ueb-cart-widget--show-zero .ueb-cart-widget__count.is-empty {
	display: inline-flex;
}
