/* Colour circles on shop and category product cards. */
.bmc-loop-swatches {
	--bmc-dot: 22px;
	--bmc-ring: currentColor;
	--bmc-tip-bg: #1d2327;
	--bmc-tip-fg: #fff;

	display: flex;
	flex-wrap: wrap;
	gap: 7px;
	margin: 0.6em 0 0;
	padding: 0;
	list-style: none;
}

.bmc-loop-swatches > li {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bmc-loop-swatches > li::before,
.bmc-loop-swatches > li::marker {
	content: none;
}

/* Reset theme button styles completely, then rebuild. */
.bmc-loop-swatches .bmc-loop-swatch {
	all: unset;
	box-sizing: border-box;
	position: relative;
	display: block;
	width: var(--bmc-dot);
	height: var(--bmc-dot);
	border-radius: 50%;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.bmc-loop-dot {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 50%;
	box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.2);
}

.bmc-loop-swatches .bmc-loop-swatch[aria-pressed="true"] {
	box-shadow: 0 0 0 2px #fff, 0 0 0 3.5px var(--bmc-ring);
}

.bmc-loop-swatches .bmc-loop-swatch:focus-visible {
	outline: 2px solid var(--bmc-ring);
	outline-offset: 3px;
}

/* Tooltip */
.bmc-tip {
	position: absolute;
	bottom: calc(100% + 9px);
	left: 50%;
	z-index: 20;
	padding: 4px 8px;
	border-radius: 4px;
	background: var(--bmc-tip-bg);
	color: var(--bmc-tip-fg);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.3;
	white-space: nowrap;
	pointer-events: none;
	opacity: 0;
	transform: translate(-50%, 3px);
	transition: opacity 0.12s ease-out, transform 0.12s ease-out;
}

.bmc-tip::after {
	content: "";
	position: absolute;
	top: 100%;
	left: 50%;
	margin-left: -5px;
	border: 5px solid transparent;
	border-top-color: var(--bmc-tip-bg);
}

.bmc-loop-swatch:hover .bmc-tip,
.bmc-loop-swatch:focus-visible .bmc-tip,
.bmc-loop-swatch.bmc-tip-show .bmc-tip {
	opacity: 1;
	transform: translate(-50%, 0);
}

@media (prefers-reduced-motion: reduce) {
	.bmc-tip {
		transition: none;
	}
}

/* "Decoration from" line on product cards. */
.bmc-decoration-from {
	--bmc-badge-from: #7b3ff2;
	--bmc-badge-to: #e9358f;
	--bmc-badge-fg: #fff;

	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.3em 0.4em;
	margin: 0.4em 0 0.75em;
	line-height: 1.3;
}

.bmc-decoration-badge {
	display: inline-block;
	padding: 0.2em 0.55em;
	border-radius: 0.4em;
	background: linear-gradient(90deg, var(--bmc-badge-from), var(--bmc-badge-to));
	color: var(--bmc-badge-fg);
	font-weight: 700;
	white-space: nowrap;
}

.bmc-decoration-text {
	color: #6b7075;
}

.bmc-decoration-price {
	font-weight: 700;
	white-space: nowrap;
}

.bmc-decoration-price .woocommerce-Price-amount {
	color: inherit;
}
