/*
 * Znaczki (badge) wtyczki: wspólny kształt i odmiany kolorów w jednym miejscu.
 * Kolory, ramki i zaokrąglenia z global-variables.css; pozycjonowanie zostaje w plikach modułów.
 */
:root {
	--astrashoptoolkit-badge-radius: var(--astrashoptoolkit-radius-sm);
	--astrashoptoolkit-badge-padding: 3px 8px;
	--astrashoptoolkit-badge-font-size: 12px;
	--astrashoptoolkit-badge-font-weight: 600;
	--astrashoptoolkit-badge-accent: var(--astrashoptoolkit-astra-color-0);
	--astrashoptoolkit-badge-on-accent: var(--astrashoptoolkit-astra-color-4);
}

/* Baza */
.tpt__tiered-pricing .tiered-pricing-bestseller,
.tpt__tiered-pricing .tiered-pricing-block__discount,
.tpt__tiered-pricing .tiered-pricing-option__bestseller,
.tpt__tiered-pricing .tiered-pricing-option__saving,
.astra-shop-toolkit-comparison__badge,
.astrashoptoolkit-returns-badge-recommended,
.astrashoptoolkit-returns-public-status-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: var(--astrashoptoolkit-badge-padding);
	border: 0;
	border-radius: var(--astrashoptoolkit-badge-radius);
	font-size: var(--astrashoptoolkit-badge-font-size);
	font-weight: var(--astrashoptoolkit-badge-font-weight);
	line-height: 1.4;
	letter-spacing: normal;
	text-transform: none;
	white-space: nowrap;
}

/* Neutralna: półprzezroczyste tło w kolorze tekstu. */
.tpt__tiered-pricing .tiered-pricing-bestseller {
	background: color-mix(in srgb, currentColor 12%, transparent);
	color: inherit;
}

/* Akcent: kolor akcentu, jasny tekst. */
.tpt__tiered-pricing .tiered-pricing-block__discount,
.tpt__tiered-pricing .tiered-pricing-option__bestseller,
.tpt__tiered-pricing .tiered-pricing-horizontal-table__bestseller {
	background: var(--astrashoptoolkit-badge-accent);
	color: var(--astrashoptoolkit-badge-on-accent);
}

/* Akcent jasny: tło i ramka z domieszką akcentu, tekst w kolorze akcentu. */
.tpt__tiered-pricing .tiered-pricing-option__saving {
	border: var(--astrashoptoolkit-border-width) solid color-mix(in srgb, var(--astrashoptoolkit-badge-accent) 25%, transparent);
	background: color-mix(in srgb, var(--astrashoptoolkit-badge-accent) 9%, var(--astrashoptoolkit-badge-on-accent));
	color: var(--astrashoptoolkit-badge-accent);
	white-space: normal;
}

/* Statusy (kolory semantyczne z global-variables.css). */
.astrashoptoolkit-returns-badge-recommended {
	background: var(--astrashoptoolkit-success-color);
	color: var(--astrashoptoolkit-success-background);
}
.astrashoptoolkit-returns-public-status-badge--completed {
	background: var(--astrashoptoolkit-success-background);
	color: var(--astrashoptoolkit-success-color);
}
.astrashoptoolkit-returns-public-status-badge--pending {
	background: var(--astrashoptoolkit-warning-background);
	color: var(--astrashoptoolkit-warning-color);
}
.astrashoptoolkit-returns-public-status-badge--approved,
.astrashoptoolkit-returns-public-status-badge--processing {
	background: var(--astrashoptoolkit-info-background);
	color: var(--astrashoptoolkit-info-color);
}
.astrashoptoolkit-returns-public-status-badge--denied {
	background: var(--astrashoptoolkit-danger-background);
	color: var(--astrashoptoolkit-danger-color);
}
.astrashoptoolkit-returns-public-status-badge--cancelled {
	background: var(--astrashoptoolkit-neutral-background);
	color: var(--astrashoptoolkit-neutral-color);
}
