/* Mini Cart */

.vora-cart {
	position: relative;
	display: inline-block;
}

.vora-cart__trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	line-height: 1;
	cursor: pointer;
	text-decoration: none;
}

.vora-cart__trigger:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: 3px;
}

.vora-cart__icon {
	position: relative;
	display: inline-flex;
	align-items: center;
	font-size: 22px;
	/* `line-height: 1` or the glyph sits below the badge it is paired with. */
	line-height: 1;
}

.vora-cart__icon svg {
	width: 1em;
	height: 1em;
	display: block;
}

.vora-cart__live,
.vora-cart__count {
	display: inline-flex;
	align-items: center;
}

.vora-cart__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 19px;
	height: 19px;
	padding: 0 5px;
	border-radius: 999px;
	background-color: #a8123f;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	font-variant-numeric: tabular-nums;
	line-height: 1;
	/* Pulled tight against the icon rather than positioned absolutely: the
	   badge is replaced wholesale by a cart fragment, and an absolutely
	   positioned element that depends on its parent's `position` is fragile
	   when swapped by outside code. */
	margin-inline-start: -4px;
	margin-block-start: -10px;
}

.vora-cart__badge[hidden] {
	display: none;
}

.vora-cart__total {
	font-size: 14px;
	font-weight: 650;
	font-variant-numeric: tabular-nums;
}

.vora-cart__panel {
	position: absolute;
	top: calc(100% + 10px);
	inset-inline-end: 0;
	/* High enough to clear a sticky header, for the same reason the Tooltip
	   needed it — a panel that opens under the header is unusable. */
	z-index: 9999;
	width: 320px;
	max-width: min(90vw, 360px);
	padding: 16px;
	border-radius: 10px;
	background-color: #fff;
	color: #17131a;
	box-shadow: 0 12px 36px rgba(23, 19, 26, 0.18);
}

.vora-cart__panel[hidden] {
	display: none;
}

/* WooCommerce's mini-cart template ships its own class names; these give them
   a sane baseline without fighting a theme that already styles them. */
.vora-cart__panel .woocommerce-mini-cart {
	margin: 0;
	padding: 0;
	list-style: none;
	max-height: 320px;
	overflow-y: auto;
}

.vora-cart__panel .woocommerce-mini-cart-item {
	display: flex;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid rgba(23, 19, 26, 0.08);
	font-size: 14px;
}

.vora-cart__panel .woocommerce-mini-cart-item img {
	width: 44px;
	height: auto;
	flex: none;
	border-radius: 6px;
}

.vora-cart__panel .woocommerce-mini-cart__total {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin: 12px 0;
	font-size: 14.5px;
	font-weight: 650;
}

.vora-cart__panel .woocommerce-mini-cart__buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 0;
}

.vora-cart__panel .woocommerce-mini-cart__empty-message {
	margin: 0;
	font-size: 14px;
	opacity: 0.75;
}
