/**
 * BoostCart storefront styles.
 * Inherits the theme's font; only colors, spacing and layout are set.
 * Override any value by redefining the custom properties in your theme.
 */
:root {
	--boostcart-primary: #6c5ce7;
	--boostcart-primary-dark: #5443d6;
	--boostcart-secondary: #00c2a8;
	--boostcart-accent: #ffb84d;
	--boostcart-dark: #171a2b;
	--boostcart-bg: #f7f8fc;
	--boostcart-surface: #ffffff;
	--boostcart-border: #e3e5f0;
	--boostcart-muted: #5b6075;
	--boostcart-radius: 10px;
	--boostcart-shadow: 0 1px 2px rgba(23, 26, 43, 0.06), 0 4px 16px rgba(23, 26, 43, 0.06);
}

.boostcart-location {
	margin: 1.25em 0;
	clear: both;
}

.boostcart-campaign + .boostcart-campaign {
	margin-top: 1em;
}

/* Buttons */
.boostcart-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.4em;
	min-height: 40px;
	padding: 0.55em 1.1em;
	border: 1px solid transparent;
	border-radius: 8px;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
}

.button.boostcart-btn--primary,
.boostcart-btn--primary {
	background: var(--boostcart-primary);
	border-color: var(--boostcart-primary);
	color: #fff;
}

.button.boostcart-btn--primary:hover,
.boostcart-btn--primary:hover {
	background: var(--boostcart-primary-dark);
	border-color: var(--boostcart-primary-dark);
	color: #fff;
}

.button.boostcart-btn--secondary,
.boostcart-btn--secondary {
	background: var(--boostcart-surface);
	border-color: var(--boostcart-primary);
	color: var(--boostcart-primary-dark);
}

.boostcart-btn--ghost {
	background: transparent;
	border-color: var(--boostcart-border);
	color: var(--boostcart-dark);
	min-height: 36px;
	padding: 0.4em 0.8em;
}

.boostcart-btn:focus-visible,
.boostcart-popup__close:focus-visible,
.boostcart-link:focus-visible,
.boostcart-offer a:focus-visible {
	outline: 3px solid var(--boostcart-primary);
	outline-offset: 2px;
}

.boostcart-btn[aria-busy="true"] {
	opacity: 0.7;
	cursor: progress;
}

.boostcart-link {
	background: none;
	border: 0;
	padding: 0;
	color: inherit;
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}

/* Offer card */
.boostcart-offer {
	display: flex;
	gap: 1em;
	padding: 1em;
	background: var(--boostcart-surface);
	border: 1px solid var(--boostcart-border);
	border-left: 4px solid var(--boostcart-primary);
	border-radius: var(--boostcart-radius);
	box-shadow: var(--boostcart-shadow);
	color: var(--boostcart-dark);
}

.boostcart-offer--cross-sell {
	display: block;
}

.boostcart-offer__media {
	flex: 0 0 88px;
}

.boostcart-offer__media img,
.boostcart-xsell__media img {
	display: block;
	width: 100%;
	height: auto;
	border-radius: 8px;
	aspect-ratio: 1;
	object-fit: cover;
}

.boostcart-offer__body {
	flex: 1;
	min-width: 0;
}

.boostcart-offer__eyebrow,
.boostcart-popup__eyebrow {
	margin: 0 0 0.25em;
	color: var(--boostcart-primary-dark);
	font-size: 0.8em;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

.boostcart-offer__title {
	margin: 0 0 0.35em;
	font-size: 1.1em;
	line-height: 1.3;
}

.boostcart-offer__header {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.5em;
	margin-bottom: 0.75em;
}

.boostcart-offer__header .boostcart-offer__title {
	margin: 0;
}

.boostcart-offer__text p {
	margin: 0 0 0.5em;
	color: var(--boostcart-muted);
}

.boostcart-offer__product {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5em;
	align-items: baseline;
	margin: 0 0 0.75em;
}

.boostcart-offer__price del {
	opacity: 0.65;
}

.boostcart-offer__price ins {
	text-decoration: none;
	font-weight: 700;
}

.boostcart-offer__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75em;
	align-items: center;
}

.boostcart-offer__status {
	margin: 0;
	font-size: 0.9em;
	color: var(--boostcart-muted);
}

.boostcart-offer__status.is-success::before {
	content: "\2713\00a0";
	color: #008a78;
	font-weight: 700;
}

.boostcart-offer__status.is-error {
	color: #b42318;
}

/* Cross-sell grid */
.boostcart-xsell {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 1em;
	margin: 0;
	padding: 0;
	list-style: none;
}

.boostcart-xsell__item {
	display: flex;
	flex-direction: column;
	gap: 0.4em;
	margin: 0;
}

.boostcart-xsell__name {
	font-weight: 600;
	line-height: 1.3;
	text-decoration: none;
	color: inherit;
}

.boostcart-xsell__item .boostcart-btn {
	margin-top: auto;
}

/* Discount notice */
.boostcart-notice {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.75em;
	padding: 0.85em 1em;
	background: #f1fbf9;
	border: 1px solid #a8e8de;
	border-radius: var(--boostcart-radius);
	color: var(--boostcart-dark);
}

.boostcart-notice__icon {
	display: inline-grid;
	place-items: center;
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--boostcart-secondary);
	color: #fff;
	font-weight: 700;
}

.boostcart-notice__text {
	flex: 1;
	margin: 0;
	min-width: 12em;
}

.boostcart-code {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 0.5em;
	margin: 1em 0;
}

.boostcart-code__value {
	padding: 0.25em 0.6em;
	background: var(--boostcart-bg);
	border: 1px dashed var(--boostcart-primary);
	border-radius: 6px;
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-weight: 700;
	letter-spacing: 0.05em;
	color: var(--boostcart-dark);
}

/* Countdown */
.boostcart-countdown {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5em;
	font-size: 0.95em;
}

.boostcart-countdown--bar {
	justify-content: center;
	padding: 0.6em 1em;
	background: var(--boostcart-dark);
	color: #fff;
}

.boostcart-location--top_bar {
	margin: 0;
}

.boostcart-countdown--inline {
	margin: 0.5em 0;
	color: var(--boostcart-dark);
}

.boostcart-countdown__clock {
	font-variant-numeric: tabular-nums;
	font-weight: 700;
}

.boostcart-countdown--inline .boostcart-countdown__clock {
	padding: 0.1em 0.45em;
	background: #fff4e0;
	border-radius: 4px;
	color: #7a4a00;
}

.boostcart-countdown.is-running .boostcart-countdown__fallback {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

/* Cart progress bar */
.boostcart-progress {
	padding: 0.85em 1em;
	background: var(--boostcart-surface);
	border: 1px solid var(--boostcart-border);
	border-radius: var(--boostcart-radius);
	color: var(--boostcart-dark);
}

.boostcart-progress[hidden] {
	display: none;
}

.boostcart-progress__message {
	display: flex;
	align-items: center;
	gap: 0.5em;
	margin: 0 0 0.6em;
	font-size: 0.95em;
	line-height: 1.4;
}

.boostcart-progress__icon {
	display: inline-grid;
	flex: 0 0 auto;
	place-items: center;
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #efedfd;
	color: var(--boostcart-primary-dark);
	font-size: 12px;
}

.boostcart-progress__track {
	position: relative;
	height: 8px;
	overflow: hidden;
	border-radius: 999px;
	background: #e9e7fb;
}

.boostcart-progress__fill {
	display: block;
	height: 100%;
	max-width: 100%;
	border-radius: inherit;
	background: var(--boostcart-primary);
}

.boostcart-progress.is-complete .boostcart-progress__fill {
	background: var(--boostcart-secondary);
}

.boostcart-progress.is-complete .boostcart-progress__icon {
	background: var(--boostcart-secondary);
	color: #fff;
}

.boostcart-location--top_bar .boostcart-progress {
	border: 0;
	border-radius: 0;
	background: var(--boostcart-dark);
	color: #fff;
	text-align: center;
}

.boostcart-location--top_bar .boostcart-progress__message {
	justify-content: center;
	margin-bottom: 0.4em;
}

.boostcart-location--top_bar .boostcart-progress__track {
	max-width: 420px;
	margin: 0 auto;
	background: rgba(255, 255, 255, 0.2);
}

.boostcart-location--mini_cart {
	margin: 0.75em 0;
}

.boostcart-location--mini_cart .boostcart-progress {
	padding: 0.6em 0.75em;
	font-size: 0.9em;
}

@media (prefers-reduced-motion: no-preference) {
	.boostcart-progress__fill {
		transition: width 0.4s ease, background-color 0.2s;
	}
}

/* Popup dialog */
.boostcart-popup {
	width: min(440px, calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	padding: 0;
	border: 0;
	border-radius: 14px;
	background: var(--boostcart-surface);
	color: var(--boostcart-dark);
	box-shadow: 0 20px 60px rgba(23, 26, 43, 0.25);
}

.boostcart-popup--after-add {
	width: min(560px, calc(100vw - 32px));
}

.boostcart-popup::backdrop {
	background: rgba(23, 26, 43, 0.55);
}

.boostcart-popup__inner {
	position: relative;
	padding: 2em 1.5em 1.5em;
	text-align: center;
}

.boostcart-popup--after-add .boostcart-popup__inner {
	text-align: left;
}

.boostcart-popup__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 40px;
	height: 40px;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: var(--boostcart-muted);
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}

.boostcart-popup__close:hover {
	background: var(--boostcart-bg);
}

.boostcart-popup__title {
	margin: 0 0 0.5em;
	font-size: 1.4em;
	line-height: 1.25;
}

.boostcart-popup__title:focus {
	outline: none;
}

.boostcart-popup__text {
	color: var(--boostcart-muted);
}

.boostcart-popup__actions {
	margin-top: 1.25em;
}

.boostcart-popup__actions .boostcart-btn {
	width: 100%;
}

.boostcart-popup__footer {
	display: flex;
	justify-content: space-between;
	gap: 1em;
	margin: 1em 0 0;
}

.boostcart-popup .boostcart-offer {
	box-shadow: none;
}

.boostcart-consent-notice {
	font-size: 0.9em;
	opacity: 0.85;
}

.boostcart-sr {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0 0 0 0);
	white-space: nowrap;
}

@media (max-width: 480px) {
	.boostcart-offer {
		flex-direction: column;
	}

	.boostcart-offer__media {
		flex-basis: auto;
		max-width: 120px;
	}

	.boostcart-xsell {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (prefers-reduced-motion: no-preference) {
	.boostcart-popup[open] {
		animation: boostcart-in 0.18s ease-out;
	}

	@keyframes boostcart-in {
		from {
			opacity: 0;
			transform: translateY(8px);
		}

		to {
			opacity: 1;
			transform: none;
		}
	}
}
