/* In-page cart feedback; the header itself keeps its existing markup. */
body .ds-cart-feedback {
	/* Chat: 20px from the edge + 58px high + 16px separation. */
	--ds-cart-feedback-bottom: 94px;
	position: fixed;
	right: 16px;
	bottom: calc(var(--ds-cart-feedback-bottom) + var(--ds-cart-feedback-sticky-offset, 0px));
	z-index: 10000;
	display: grid;
	gap: 14px;
	width: calc(100% - 32px);
	max-width: 460px;
	max-height: calc(100vh - var(--ds-cart-feedback-bottom) - var(--ds-cart-feedback-sticky-offset, 0px) - 16px);
	max-height: calc(100dvh - var(--ds-cart-feedback-bottom) - var(--ds-cart-feedback-sticky-offset, 0px) - 16px);
	padding: 20px;
	overflow: auto;
	color: var(--ds-color-text-primary);
	font-size: 14px;
	line-height: 20px;
	background: var(--ds-color-bg-page, #fff);
	border: 1px solid var(--ds-color-border-default, #d7dde4);
	border-radius: var(--ds-radius-12, 12px);
	box-shadow: 0 8px 32px rgba(23, 25, 28, 0.16);
}

body.ds-product-single-v1.ds-product-sticky-cart-visible .ds-cart-feedback {
	--ds-cart-feedback-sticky-offset: var(--ds-product-sticky-cart-height, 84px);
}

body.ds-product-single-v1.ds-product-sticky-cart-visible :is(#tidio-chat, #ds-chat-launcher) {
	transform: translateY(calc(-1 * var(--ds-product-sticky-cart-height, 84px))) !important;
}

body .ds-cart-feedback[hidden] {
	display: none !important;
}

body .ds-cart-feedback.is-error {
	border-color: var(--ds-color-danger, #b42318);
}

body .ds-cart-feedback :is(.woocommerce-message, .woocommerce-error, .woocommerce-info) {
	margin: 0;
	padding: 0;
	color: inherit;
	font-size: inherit;
	line-height: inherit;
	background: transparent;
	border: 0;
	box-shadow: none;
}

body .ds-cart-feedback :is(.woocommerce-message, .woocommerce-error, .woocommerce-info)::before {
	display: none;
}

body .ds-cart-feedback .wc-block-components-notice-banner {
	min-height: 0;
	margin: 0 !important;
	padding: 0 !important;
	color: #4ab866;
	background: transparent !important;
	border: 0 !important;
	box-shadow: none !important;
}

body .ds-cart-feedback .wc-block-components-notice-banner__content {
	color: #4ab866;
	font-size: 14px;
	font-weight: 700;
	line-height: 20px;
}

body .ds-cart-feedback .wc-block-components-notice-banner > svg {
	flex: 0 0 24px;
	background: #4ab866;
}

body .ds-cart-feedback .wc-block-components-notice-banner.is-success > svg {
	margin-right: 8px;
	border-radius: 50%;
}

body .ds-cart-feedback .wc-block-components-notice-banner > svg path {
	fill: #fff;
}

body .ds-cart-feedback__content {
	padding-right: 34px;
	font-weight: 700;
}

body .ds-cart-feedback__summary[hidden] {
	display: none !important;
}

body .ds-cart-feedback__product {
	display: grid;
	grid-template-columns: 88px minmax(0, 1fr);
	gap: 14px;
	align-items: center;
}

body .ds-cart-feedback__media {
	width: 88px;
	height: 88px;
	overflow: hidden;
	background: var(--ds-color-bg-page, #fff);
	border: 1px solid var(--ds-color-border-default, #d7dde4);
	border-radius: var(--ds-radius-8, 8px);
}

body .ds-cart-feedback__image {
	display: block;
	width: 100% !important;
	height: 100% !important;
	margin: 0 !important;
	object-fit: contain;
}

body .ds-cart-feedback__details {
	min-width: 0;
}

body .ds-cart-feedback__code,
body .ds-cart-feedback__title,
body .ds-cart-feedback__price {
	margin: 0 !important;
}

body .ds-cart-feedback__code {
	margin-bottom: 3px !important;
	color: var(--ds-color-text-secondary, #68717c);
	font-size: 12px;
	line-height: 16px;
}

body .ds-cart-feedback__code strong {
	font-weight: 700;
}

body .ds-cart-feedback__title {
	margin-bottom: 7px !important;
	color: var(--ds-color-text-primary);
	font-size: 16px !important;
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 20px !important;
}

body .ds-cart-feedback__price,
body .ds-cart-feedback__price .amount {
	color: var(--ds-color-brand-strong, #1e5f9e);
	font-size: 18px !important;
	font-weight: 700;
	line-height: 22px !important;
}

body .ds-cart-feedback__price del {
	margin-right: 5px;
	opacity: 0.5;
}

body .ds-cart-feedback__price ins {
	text-decoration: none;
}

body .ds-cart-feedback__subtotal {
	display: flex;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
	margin-top: 14px;
	padding-top: 14px;
	font-size: 15px;
	line-height: 20px;
	border-top: 1px solid var(--ds-color-border-default, #d7dde4);
}

body .ds-cart-feedback__subtotal > span {
	font-weight: 600;
}

body .ds-cart-feedback__subtotal > strong,
body .ds-cart-feedback__subtotal .amount {
	color: var(--ds-color-text-primary);
	font-size: 17px;
	font-weight: 700;
}

body .ds-cart-feedback__cart {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 44px;
	padding: 10px 18px;
	color: #fff;
	font-size: 14px;
	font-weight: 700;
	line-height: 20px;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	background: var(--ds-color-action-primary);
	border-radius: var(--ds-radius-8, 8px);
}

body .ds-cart-feedback__cart:hover,
body .ds-cart-feedback__cart:focus-visible {
	color: #fff;
	background: var(--ds-color-action-hover);
}

body .ds-cart-feedback__close {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 32px;
	height: 32px;
	padding: 0;
	color: inherit;
	font-size: 24px;
	font-weight: 400;
	line-height: 32px;
	background: transparent;
	border: 0;
	border-radius: 50%;
	cursor: pointer;
}

body .ds-cart-feedback__close:hover {
	background: var(--ds-color-bg-subtle, #f3f6f9);
}

body .ds-cart-feedback__close:focus-visible {
	outline: 2px solid var(--ds-color-brand-strong, #1e5f9e);
	outline-offset: 2px;
}

@media (max-width: 600px) {
	body .ds-cart-feedback {
		right: 10px;
		width: calc(100% - 20px);
		padding: 16px;
	}

	body .ds-cart-feedback__product {
		grid-template-columns: 72px minmax(0, 1fr);
		gap: 12px;
	}

	body .ds-cart-feedback__media {
		width: 72px;
		height: 72px;
	}

	body .ds-cart-feedback__title {
		font-size: 15px !important;
		line-height: 19px !important;
	}
}

@media (max-width: 480px) {
	body .ds-cart-feedback {
		/* Mobile chat: 16px edge + 54px high + 16px separation. */
		--ds-cart-feedback-bottom: calc(86px + env(safe-area-inset-bottom, 0px));
	}
}

/* The notification owns the cart CTA after an in-page addition. */
body.ds-product-cart-ready .ds-product-card > .added_to_cart.wc-forward {
	display: none !important;
}
