/*!
 * Bundle Save Tiers © DTech Creative. Proprietary – use requires a licence. See license.txt.
 */
/**
 * Bundle Save Tiers – product page selector, picker dialog and cart grouping.
 *
 * Every colour, the radius and the spacing are custom properties on :where(.bst-selector, .bst-dialog).
 * :where() has zero specificity, so a theme can override any token, e.g.
 *   .bst-selector, .bst-dialog { --bst-accent: #0b6e4f; }
 * Fonts are inherited from the theme. Spacing follows a 4px scale. Logical properties are used,
 * so right-to-left sites need only a few overrides (frontend-rtl.css).
 */

:where(.bst-selector, .bst-dialog) {
	--bst-accent: #1e73be;
	--bst-text: #183153;
	--bst-muted: #6b7a8c;
	--bst-line: #e3ebf3;
	--bst-soft: #f4f8fc;
	--bst-surface: #ffffff;
	--bst-success: #1f7a4d;
	--bst-badge: #183153;
	--bst-badge-text: #ffffff;
	--bst-on-accent: #ffffff;
	--bst-error: #a4262c;
	--bst-error-soft: #fcf0f1;
	--bst-skeleton: #e9eef4;
	--bst-radius: 10px;
	--bst-radius-sm: 6px;
	--bst-gap: 8px;
	--bst-pad-y: 14px;
	--bst-pad-x: 16px;
	--bst-speed: 180ms;
	--bst-expand: 220ms;

	/* Derived shades; the first value is the fallback for browsers without color-mix(). */
	--bst-accent-soft: #e8f1fa;
	--bst-accent-soft: color-mix(in srgb, var(--bst-accent) 10%, var(--bst-surface));
	--bst-accent-faint: #a5c7e5;
	--bst-accent-faint: color-mix(in srgb, var(--bst-accent) 40%, var(--bst-line));
}

/* Base ---------------------------------------------------------------------- */

.bst-selector {
	position: relative;
	container: bst-selector / inline-size;
	flex: 1 0 100%;
	width: 100%;
	clear: both;
	margin: 0 0 16px;
	color: var(--bst-text);
	font-variant-numeric: tabular-nums;
}

.bst-selector *,
.bst-dialog * {
	box-sizing: border-box;
}

.bst-selector.is-broken {
	display: none;
}

.bst-visually-hidden {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.bst-selector button,
.bst-dialog button {
	min-width: 0;
	min-height: 0;
	margin: 0;
	font: inherit;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
	text-shadow: none;
	box-shadow: none;
	cursor: pointer;
}

.bst-selector button:disabled,
.bst-dialog button:disabled {
	cursor: default;
}

.bst-selector :focus-visible,
.bst-dialog :focus-visible {
	outline: 2px solid var(--bst-accent);
	outline-offset: 2px;
}

.bst-selector .amount,
.bst-dialog .amount {
	color: inherit;
	font-weight: inherit;
}

.bst-selector svg,
.bst-dialog svg {
	display: block;
	flex: none;
}

/* Heading ------------------------------------------------------------------- */

.bst-heading {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0 0 12px;
	color: var(--bst-text);
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	line-height: 1.4;
	text-align: center;
	text-transform: uppercase;
}

.bst-heading::before,
.bst-heading::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--bst-line);
}

/* Tier cards ---------------------------------------------------------------- */

.bst-tiers {
	display: flex;
	flex-direction: column;
	gap: var(--bst-gap);
}

.bst-tier {
	position: relative;
	border: 1px solid var(--bst-line);
	border-radius: var(--bst-radius);
	background: var(--bst-soft);
}

.bst-tier.has-badge {
	margin-top: 8px;
}

.bst-tier.is-popular:not(.is-selected) {
	border-color: var(--bst-accent-faint);
}

.bst-tier.is-selected {
	border-color: var(--bst-accent);
	background: var(--bst-surface);
	box-shadow: inset 0 0 0 0.5px var(--bst-accent);
}

.bst-tier.is-focus-visible {
	outline: 2px solid var(--bst-accent);
	outline-offset: 2px;
}

.bst-tier__main {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 44px;
	margin: 0;
	padding: var(--bst-pad-y) var(--bst-pad-x);
	cursor: pointer;
	font-weight: inherit;
}

.bst-tier__radio {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: 0;
	opacity: 0;
	pointer-events: none;
}

.bst-tier__control {
	display: grid;
	flex: none;
	place-items: center;
	width: 18px;
	height: 18px;
	border: 1.5px solid var(--bst-muted);
	border-radius: 50%;
	background: var(--bst-surface);
}

.bst-tier__control::after {
	content: "";
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--bst-accent);
	transform: scale(0);
}

.bst-tier.is-selected .bst-tier__control {
	border-color: var(--bst-accent);
	box-shadow: 0 0 0 3px var(--bst-accent-soft);
}

.bst-tier.is-selected .bst-tier__control::after {
	transform: scale(1);
}

.bst-tier__image {
	flex: none;
	width: 48px;
	height: 48px;
	border-radius: var(--bst-radius-sm);
	object-fit: cover;
}

.bst-tier__text {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.bst-tier__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 4px 8px;
}

.bst-tier__title {
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.3;
}

.bst-tier__pill {
	display: inline-block;
	padding: 2px 6px;
	border-radius: 4px;
	background: var(--bst-accent-soft);
	color: var(--bst-accent);
	font-size: 0.6875rem;
	font-weight: 600;
	line-height: 1.3;
	white-space: nowrap;
}

.bst-tier__sub {
	color: var(--bst-muted);
	font-size: 0.8125rem;
	line-height: 1.4;
}

.bst-tier__sub.is-saving {
	color: var(--bst-success);
	font-weight: 500;
}

.bst-tier__price {
	display: flex;
	flex: none;
	flex-direction: column;
	align-items: flex-end;
	gap: 2px;
	line-height: 1.25;
	text-align: end;
	white-space: nowrap;
}

.bst-tier__now {
	display: inline-flex;
	align-items: baseline;
	gap: 4px;
}

.bst-tier__unit {
	font-size: 1.0625rem;
	font-weight: 600;
}

.bst-tier__each {
	color: var(--bst-muted);
	font-size: 0.8125rem;
}

.bst-tier__regular {
	color: var(--bst-muted);
	font-size: 0.75rem;
}

/* Corner label, as on the reference store: a tab that hangs from the card's top edge, top-right,
 * with rounded bottom corners and two darker folds at the top that make it look wrapped over the edge. */

.bst-tier.has-badge .bst-tier__main {
	padding-block: calc(var(--bst-pad-y) + 7px);
}

.bst-ribbon {
	--bst-ribbon-bg: var(--bst-badge);

	position: absolute;
	top: -8px;
	inset-inline-end: var(--bst-radius);
	z-index: 3;
	pointer-events: none;
}

.bst-ribbon__content {
	display: block;
	margin: 0 8px;
	padding: 6px 8px;
	border-radius: 0 0 5px 5px;
	background: var(--bst-ribbon-bg);
	color: var(--bst-badge-text);
	font-size: 0.75rem;
	font-weight: 700;
	letter-spacing: 0.02em;
	line-height: 1;
	text-transform: uppercase;
	white-space: nowrap;
}

.bst-ribbon__content::before,
.bst-ribbon__content::after {
	content: "";
	position: absolute;
	top: 0;
	display: block;
	width: 0;
	height: 0;
	border-bottom: 8px solid var(--bst-ribbon-bg);
	filter: brightness(0.7);
}

.bst-ribbon__content::before {
	inset-inline-start: 0;
	border-inline-start: 8px solid transparent;
}

.bst-ribbon__content::after {
	inset-inline-end: 0;
	border-inline-end: 8px solid transparent;
}

.bst-ribbon--accent {
	--bst-ribbon-bg: var(--bst-accent);
}

.bst-ribbon--accent .bst-ribbon__content,
.bst-ribbon--success .bst-ribbon__content {
	color: var(--bst-on-accent);
}

.bst-ribbon--success {
	--bst-ribbon-bg: var(--bst-success);
}

.bst-ribbon__short {
	display: none;
}

/* Selected tier body: expands from 0fr to 1fr. */

.bst-tier__collapse {
	display: grid;
	grid-template-rows: 0fr;
}

.bst-tier.is-selected .bst-tier__collapse {
	grid-template-rows: 1fr;
}

.bst-tier__body {
	min-height: 0;
	overflow: hidden;
}

.bst-tier.is-selected .bst-tier__body {
	margin: 0 var(--bst-pad-x);
	padding: 12px 0 var(--bst-pad-x);
	border-top: 1px solid var(--bst-line);
}

.bst-hint {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 8px;
	color: var(--bst-accent);
	font-size: 0.8125rem;
	line-height: 1.4;
}

/* Slots --------------------------------------------------------------------- */

.bst-slots {
	display: grid;
	gap: var(--bst-gap);
	margin: 0;
	padding: 0;
	list-style: none;
}

.bst-slot {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 56px;
	margin: 0;
	padding: 8px;
	border: 1px dashed var(--bst-line);
	border-radius: var(--bst-radius-sm);
	background: var(--bst-surface);
}

.bst-slot.is-filled {
	border-style: solid;
}

.bst-slot__media {
	display: grid;
	flex: none;
	place-items: center;
	width: 40px;
	height: 40px;
	border-radius: var(--bst-radius-sm);
	background: var(--bst-soft);
	color: var(--bst-muted);
	overflow: hidden;
}

.bst-slot:not(.is-filled) .bst-slot__media {
	border: 1px dashed var(--bst-line);
	border-radius: 50%;
	color: var(--bst-accent);
}

/* The whole empty slot (including the + icon) opens the picker. */
.bst-slot.is-empty {
	cursor: pointer;
}

.bst-slot.is-empty:hover {
	border-color: var(--bst-accent);
}

.bst-slot.is-empty:hover .bst-slot__media {
	border-style: solid;
	border-color: var(--bst-accent);
	background: var(--bst-accent-soft);
}

.bst-slot__image {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.bst-slot__text {
	display: flex;
	flex: 1;
	flex-direction: column;
	min-width: 0;
}

.bst-slot__name {
	font-size: 0.875rem;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.bst-slot__name.is-hint,
.bst-slot__meta {
	color: var(--bst-muted);
	font-size: 0.8125rem;
}

.bst-slot__tag {
	flex: none;
	padding: 2px 8px;
	border-radius: 999px;
	background: var(--bst-soft);
	color: var(--bst-muted);
	font-size: 0.6875rem;
	font-weight: 600;
	white-space: nowrap;
}

/* 32px visual height, 44px tap area through the ::after overlay. */
.bst-selector .bst-slot__choose {
	position: relative;
	flex: none;
	height: 32px;
	padding: 0 12px;
	border: 1px solid var(--bst-accent);
	border-radius: var(--bst-radius-sm);
	background: var(--bst-accent);
	color: var(--bst-on-accent);
	font-size: 0.75rem;
	font-weight: 600;
}

.bst-selector .bst-slot__choose::after {
	content: "";
	position: absolute;
	inset: -6px -4px;
}

.bst-selector .bst-slot__choose:hover,
.bst-selector .bst-slot__choose:focus {
	border-color: var(--bst-text);
	background: var(--bst-text);
	color: var(--bst-on-accent);
}

.bst-selector .bst-slot__remove {
	display: grid;
	flex: none;
	place-items: center;
	width: 44px;
	height: 44px;
	margin-block: -6px;
	margin-inline-end: -4px;
	padding: 0;
	border: 0;
	border-radius: var(--bst-radius-sm);
	background: transparent;
	color: var(--bst-muted);
}

.bst-selector .bst-slot__remove:hover,
.bst-selector .bst-slot__remove:focus {
	background: var(--bst-soft);
	color: var(--bst-text);
}

/* Skeleton while the script starts. */

.bst-slot--skeleton {
	border-style: solid;
	border-color: var(--bst-soft);
}

.bst-skeleton {
	display: block;
	border-radius: var(--bst-radius-sm);
	background: var(--bst-skeleton);
}

.bst-skeleton--thumb {
	flex: none;
	width: 40px;
	height: 40px;
}

.bst-skeleton--line {
	width: 45%;
	height: 10px;
}

/* Stepper ------------------------------------------------------------------- */

.bst-stepper {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: 12px 0 0;
}

.bst-stepper__label {
	margin: 0;
	color: var(--bst-muted);
	font-size: 0.8125rem;
}

.bst-stepper__control {
	display: inline-flex;
	align-items: center;
	height: 32px;
	border: 1px solid var(--bst-line);
	border-radius: 999px;
	background: var(--bst-surface);
}

.bst-selector .bst-stepper__button {
	position: relative;
	display: grid;
	place-items: center;
	width: 32px;
	height: 30px;
	padding: 0;
	border: 0;
	border-radius: 999px;
	background: transparent;
	color: var(--bst-text);
}

.bst-selector .bst-stepper__button::after {
	content: "";
	position: absolute;
	inset: -7px -6px;
}

.bst-selector .bst-stepper__button:hover,
.bst-selector .bst-stepper__button:focus {
	background: var(--bst-soft);
	color: var(--bst-text);
}

.bst-selector .bst-stepper__button:disabled {
	background: transparent;
	color: var(--bst-line);
}

.bst-selector .bst-stepper__input {
	width: 36px;
	height: 30px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	color: var(--bst-text);
	font: inherit;
	font-variant-numeric: tabular-nums;
	font-weight: 600;
	text-align: center;
	box-shadow: none;
	-moz-appearance: textfield;
	appearance: textfield;
}

.bst-stepper__input::-webkit-outer-spin-button,
.bst-stepper__input::-webkit-inner-spin-button {
	margin: 0;
	-webkit-appearance: none;
}

/* Summary and messages ------------------------------------------------------ */

.bst-summary {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 8px;
	margin: 12px 0 0;
	color: var(--bst-text);
	font-size: 0.9375rem;
	line-height: 1.4;
}

.bst-summary strong {
	font-weight: 700;
}

.bst-summary__save {
	color: var(--bst-success);
}

.bst-summary__dot {
	margin-inline-end: 4px;
	color: var(--bst-muted);
}

.bst-message {
	margin: 12px 0 0;
	padding: 8px 12px;
	border-inline-start: 3px solid currentColor;
	border-radius: 4px;
	font-size: 0.875rem;
	line-height: 1.45;
}

.bst-message--error {
	background: var(--bst-error-soft);
	color: var(--bst-error);
}

.bst-message--success {
	background: var(--bst-soft);
	color: var(--bst-success);
}

.bst-message--success a {
	margin-inline-start: 4px;
	color: var(--bst-accent);
	font-weight: 600;
}

.bst-add-button {
	width: 100%;
	margin-top: 12px;
}

/* Add-to-cart button while sending. */

.bst-is-busy {
	position: relative;
	pointer-events: none;
	opacity: 0.85;
}

.bst-spinner {
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-inline-end: 8px;
	border: 2px solid currentColor;
	border-inline-end-color: transparent;
	border-radius: 50%;
	vertical-align: -0.15em;
}

/* Product form integration -------------------------------------------------- */

.bst-qty-note {
	flex: 1 0 100%;
	margin: 0 0 8px;
	font-size: 0.875em;
	opacity: 0.8;
}

form.cart.bst-hide-qty .quantity {
	display: none;
}

/* Compact layout ------------------------------------------------------------ */

.bst-layout--compact .bst-tiers {
	gap: 4px;
}

.bst-layout--compact .bst-tier__main {
	gap: 10px;
	padding: 10px 12px;
}

.bst-layout--compact .bst-tier__sub,
.bst-layout--compact .bst-tier__image,
.bst-layout--compact .bst-tier__regular {
	display: none;
}

.bst-layout--compact .bst-ribbon {
	position: static;
	order: 3;
}

.bst-layout--compact .bst-ribbon__content {
	margin: 0;
	border-radius: 4px;
}

.bst-layout--compact .bst-ribbon__content::before,
.bst-layout--compact .bst-ribbon__content::after {
	display: none;
}

.bst-layout--compact .bst-tier.has-badge .bst-tier__main {
	padding-block: 10px;
}

.bst-layout--compact .bst-tier.has-badge {
	margin-top: 0;
}

/* Picker dialog ------------------------------------------------------------- */

html.bst-dialog-open {
	overflow: hidden;
}

.bst-dialog {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	color: var(--bst-text);
	font-variant-numeric: tabular-nums;
}

.bst-dialog__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(16, 24, 40, 0.5);
}

.bst-dialog__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(480px, 100%);
	max-height: min(80vh, 640px);
	border-radius: var(--bst-radius);
	background: var(--bst-surface);
	box-shadow: 0 12px 32px rgba(16, 24, 40, 0.18);
	overflow: hidden;
}

.bst-dialog__panel:focus {
	outline: none;
}

.bst-dialog__handle {
	display: none;
}

.bst-dialog__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding-block: 8px;
	padding-inline: 20px 8px;
	border-bottom: 1px solid var(--bst-line);
}

.bst-dialog__title {
	margin: 0;
	color: var(--bst-text);
	font-size: 1.0625rem;
	font-weight: 600;
	line-height: 1.3;
}

.bst-dialog .bst-dialog__close {
	display: grid;
	flex: none;
	place-items: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: var(--bst-radius-sm);
	background: transparent;
	color: var(--bst-muted);
}

.bst-dialog .bst-dialog__close:hover,
.bst-dialog .bst-dialog__close:focus {
	background: var(--bst-soft);
	color: var(--bst-text);
}

.bst-dialog__body {
	padding: 4px 20px 20px;
	overflow-y: auto;
	overscroll-behavior: contain;
}

.bst-picker {
	margin: 0;
	padding: 0;
	list-style: none;
}

.bst-picker__row {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 0;
	padding: 12px 0;
	border-bottom: 1px solid var(--bst-line);
}

.bst-picker__row:last-child {
	border-bottom: 0;
}

.bst-picker__row.is-disabled .bst-picker__image,
.bst-picker__row.is-disabled .bst-picker__info {
	opacity: 0.55;
}

.bst-picker__image {
	flex: none;
	width: 64px;
	height: 64px;
	border: 1px solid var(--bst-line);
	border-radius: var(--bst-radius-sm);
	object-fit: cover;
}

.bst-picker__info {
	display: flex;
	flex: 1;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.bst-picker__name {
	font-weight: 600;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.bst-picker__price {
	font-size: 0.875rem;
}

.bst-picker__price del {
	margin-inline-start: 6px;
	color: var(--bst-muted);
	font-size: 0.8125rem;
}

.bst-picker__chosen {
	align-self: flex-start;
	padding: 1px 6px;
	border-radius: 4px;
	background: var(--bst-soft);
	color: var(--bst-muted);
	font-size: 0.6875rem;
	font-weight: 600;
}

.bst-dialog .bst-picker__choose,
.bst-dialog .bst-variation__confirm {
	flex: none;
	min-height: 40px;
	padding: 0 16px;
	border: 1px solid var(--bst-accent);
	border-radius: var(--bst-radius-sm);
	background: var(--bst-accent);
	color: var(--bst-on-accent);
	font-size: 0.875rem;
	font-weight: 600;
}

.bst-dialog .bst-picker__choose:hover,
.bst-dialog .bst-picker__choose:focus,
.bst-dialog .bst-variation__confirm:hover,
.bst-dialog .bst-variation__confirm:focus {
	border-color: var(--bst-text);
	background: var(--bst-text);
	color: var(--bst-on-accent);
}

.bst-dialog .bst-picker__choose:disabled,
.bst-dialog .bst-variation__confirm:disabled {
	border-color: var(--bst-line);
	background: var(--bst-soft);
	color: var(--bst-muted);
}

.bst-variation {
	padding-top: 12px;
}

.bst-variation__field {
	margin: 0 0 12px;
}

.bst-variation__field label {
	display: block;
	margin-bottom: 4px;
	font-size: 0.875rem;
	font-weight: 600;
}

.bst-variation__field select {
	width: 100%;
	min-height: 44px;
}

.bst-variation__status {
	min-height: 1.5em;
	margin: 0 0 12px;
	color: var(--bst-muted);
	font-size: 0.875rem;
}

.bst-variation__actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin: 0;
}

.bst-dialog .bst-variation__back {
	min-height: 40px;
	padding: 0 16px;
	border: 1px solid var(--bst-line);
	border-radius: var(--bst-radius-sm);
	background: var(--bst-surface);
	color: var(--bst-text);
}

.bst-dialog .bst-variation__back:hover,
.bst-dialog .bst-variation__back:focus {
	background: var(--bst-soft);
	color: var(--bst-text);
}

/* Cart, mini-cart, checkout (outside the selector, so tokens have fallbacks) */

.bst-cart-group {
	display: flex;
	flex-wrap: wrap;
	gap: 2px 8px;
	margin-bottom: 4px;
	font-size: 0.8125em;
	line-height: 1.4;
}

.bst-cart-group__title {
	color: var(--bst-text, #183153);
	font-weight: 600;
	letter-spacing: 0.02em;
}

.bst-cart-group__saving,
.bst-you-save th,
.bst-you-save td,
.bst-you-save strong {
	color: var(--bst-success, #1f7a4d);
	font-weight: 600;
}

tr.bst-bundle-item > td:first-child {
	box-shadow: inset 2px 0 0 var(--bst-accent, #1e73be);
	padding-inline-start: 12px;
}

/* Lines 2+ of a bundle are indented under the bundle header. */
tr.bst-bundle-item:not(.bst-bundle-item--first) td.product-name {
	padding-inline-start: 16px;
}

/* No separator inside a bundle; the group ends with the normal row border. */
tr.bst-bundle-item:not(.bst-bundle-item--last) > td {
	border-bottom-color: transparent;
}

/* Checkout review table. */
.woocommerce-checkout-review-order-table tr.bst-bundle-item > td:first-child {
	padding-inline-start: 12px;
}

.woocommerce-checkout-review-order-table tr.bst-bundle-item:not(.bst-bundle-item--first) > td.product-name {
	padding-inline-start: 20px;
}

li.bst-bundle-item {
	box-shadow: inset 2px 0 0 var(--bst-accent, #1e73be);
	padding-inline-start: 12px;
}

li.bst-bundle-item:not(.bst-bundle-item--first) {
	padding-inline-start: 20px;
}

.wc-block-cart-items__row.bst-bundle-item > td:first-child,
.wc-block-components-order-summary-item.bst-bundle-item {
	box-shadow: inset 2px 0 0 var(--bst-accent, #1e73be);
	padding-inline-start: 8px;
}

.bst-blocks-savings .wc-block-components-totals-item__label,
.bst-blocks-savings .wc-block-components-totals-item__value {
	color: var(--bst-success, #1f7a4d);
	font-weight: 600;
}

/* Small screens ------------------------------------------------------------- */

@media (max-width: 600px) {
	.bst-dialog {
		align-items: flex-end;
		padding: 0;
	}

	.bst-dialog__panel {
		width: 100%;
		max-height: 85vh;
		border-radius: var(--bst-radius) var(--bst-radius) 0 0;
	}

	.bst-dialog__handle {
		display: block;
		flex: none;
		width: 40px;
		height: 4px;
		margin: 8px auto 0;
		border-radius: 999px;
		background: var(--bst-line);
		cursor: grab;
		touch-action: none;
	}

	.bst-dialog__body {
		padding: 4px 16px 24px;
	}
}

/* Narrow: the selector itself is under 400px wide (phones, sidebars, admin previews). */
@container bst-selector (max-width: 400px) {
	.bst-tier__main {
		flex-wrap: wrap;
		gap: 6px 12px;
		padding: 12px;
	}

	.bst-tier__price {
		flex-basis: 100%;
		flex-direction: row;
		align-items: baseline;
		gap: 8px;
		padding-inline-start: 30px;
	}

	.bst-tier__title {
		font-size: 0.9375rem;
	}

	.bst-hint {
		font-size: 0.75rem;
	}

	.bst-ribbon {
		inset-inline-end: 4px;
	}

	.bst-ribbon__full {
		display: none;
	}

	.bst-ribbon__short {
		display: inline;
	}

	.bst-tier.is-selected .bst-tier__body {
		margin: 0 12px;
		padding: 12px 0;
	}

	.bst-slot {
		gap: 8px;
	}
}

/* Same rules for browsers without container queries. */
@supports not (container-type: inline-size) {
	@media (max-width: 400px) {
		.bst-tier__main {
			flex-wrap: wrap;
			gap: 6px 12px;
			padding: 12px;
		}

		.bst-tier__price {
			flex-basis: 100%;
			flex-direction: row;
			align-items: baseline;
			gap: 8px;
			padding-inline-start: 30px;
		}

		.bst-tier__title {
			font-size: 0.9375rem;
		}

		.bst-hint {
			font-size: 0.75rem;
		}

		.bst-ribbon {
			inset-inline-end: 4px;
		}

		.bst-ribbon__full {
			display: none;
		}

		.bst-ribbon__short {
			display: inline;
		}

		.bst-tier.is-selected .bst-tier__body {
			margin: 0 12px;
			padding: 12px 0;
		}

		.bst-slot {
			gap: 8px;
		}
	}
}

/* Motion: only when the visitor has not asked for reduced motion ------------ */

@media (prefers-reduced-motion: no-preference) {
	.bst-tier,
	.bst-slot,
	.bst-tier__control,
	.bst-slot__choose,
	.bst-picker__choose {
		transition: border-color var(--bst-speed) ease, background-color var(--bst-speed) ease, color var(--bst-speed) ease, box-shadow var(--bst-speed) ease;
	}

	.bst-tier__control::after {
		transition: transform var(--bst-speed) ease;
	}

	.bst-tier__collapse {
		transition: grid-template-rows var(--bst-expand) ease-out;
	}

	.bst-tier__body {
		transition: opacity var(--bst-expand) ease-out;
	}

	.bst-tier:not(.is-selected) .bst-tier__body {
		opacity: 0;
	}

	.bst-selector.is-ready .bst-slots {
		animation: bst-fade-in 150ms ease;
	}

	.bst-slot.is-new {
		animation: bst-fade-in 180ms ease;
	}

	.bst-skeleton {
		animation: bst-pulse 1.2s ease-in-out infinite;
	}

	.bst-spinner {
		animation: bst-spin 0.7s linear infinite;
	}

	.bst-dialog__panel {
		animation: bst-fade-in 160ms ease;
	}

	@media (max-width: 600px) {
		.bst-dialog__panel {
			animation: bst-slide-up 240ms ease-out;
		}
	}
}

@keyframes bst-fade-in {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

@keyframes bst-slide-up {
	from {
		transform: translateY(100%);
	}

	to {
		transform: none;
	}
}

@keyframes bst-pulse {
	50% {
		opacity: 0.55;
	}
}

@keyframes bst-spin {
	to {
		transform: rotate(360deg);
	}
}

/* The hidden attribute always wins over component display rules (kept last, higher specificity). */
.bst-selector [hidden][hidden],
.bst-dialog [hidden][hidden],
.bst-dialog[hidden][hidden] {
	display: none;
}
