/*
 * The order basket's button (assets/js/basket-badge.js): a cart at the top
 * right while something is in the order, how many things it holds on it.
 * In the header's own colours; its count in the site's accent.
 */
.aws-basket-badge {
	align-items: center;
	border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
	border-radius: 999px;
	box-sizing: border-box;
	color: inherit;
	display: inline-flex;
	flex: none;
	height: 2.75rem;
	justify-content: center;
	position: relative;
	text-decoration: none;
	width: 2.75rem;
}

.aws-basket-badge[hidden] { display: none; }
.aws-basket-badge:hover { background: color-mix(in srgb, currentColor 8%, transparent); color: inherit; }
.aws-basket-badge:focus-visible { outline: 2px solid var(--wp--preset--color--accent, currentColor); outline-offset: 2px; }

.aws-basket-badge__count {
	background: var(--wp--preset--color--accent, #c2410c);
	border: 2px solid var(--wp--preset--color--background, #fff);
	border-radius: 999px;
	color: var(--wp--preset--color--background, #fff);
	font-size: .72rem;
	font-weight: 700;
	line-height: 1;
	min-width: 1.4rem;
	padding: .2rem .35rem;
	position: absolute;
	right: -.3rem;
	text-align: center;
	top: -.3rem;
}

.aws-basket-badge__count:empty { display: none; }

/* Last in the header's row. */
.aws-basket-badge.is-head { order: 99; }
.aws-basket-badge.is-store.is-alone { margin-inline-start: auto; }

/* Beside the menu's button on a phone, taking the room that pushed it right. */
.aws-basket-badge.is-by-menu { margin-inline-start: auto; order: 0; }
.aws-basket-badge.is-by-menu + .aws-cart__fab.is-by-menu { margin-inline-start: -.75rem; }
.aws-basket-badge.is-by-menu + .aws-head__toggle,
.aws-basket-badge.is-by-menu + .aws-cart__fab + .aws-head__toggle { margin-inline-start: -.75rem; }
.aws-head__inner:has(.aws-basket-badge.is-by-menu) .aws-head__brand { flex: 1 1 0; min-width: 0; }
.aws-head__inner:has(.aws-basket-badge.is-by-menu) .aws-head__ways { flex-basis: 100%; }

/* No header to sit in: pinned to the corner. */
.aws-basket-badge.is-pinned { background: var(--wp--preset--color--background, #fff); box-shadow: 0 .5rem 1.5rem rgb(0 0 0 / 18%); position: fixed; right: 1.25rem; top: 1.25rem; z-index: 90; }
