.wp-block-woocommerce-cart .wc-block-components-totals-coupon__button {
	border-radius: 6px;
}

.wp-block-woocommerce-cart:has(.wc-block-components-skeleton__element)
	.wc-block-components-totals-fees__desconto-pix-boleto
	.wc-block-components-totals-item__value {
	position: relative;
	width: 45px;
	height: 1em;
	overflow: hidden;
	border-radius: 4px;
	background: color-mix(in srgb, currentColor 5%, transparent);
	text-indent: -9999px;

	&::after {
		content: "";
		position: absolute;
		inset: 0;
		background: linear-gradient(
			90deg,
			transparent,
			color-mix(in srgb, currentColor 5%, transparent) 50%,
			transparent
		);
		animation: wc-skeleton-shimmer 1.25s infinite;
		transform: translateX(-100%);
	}
}

/* Hidden on mobile due to long Portuguese translation. */
.wp-block-woocommerce-cart .wc-block-components-sale-badge {
	display: none;
}

/* Hides the "O frete será calculado na finalização da compra" text from cart */
.wp-block-woocommerce-cart .wc-block-components-totals-footer-item-shipping {
	display: none;
}

.wp-block-woocommerce-empty-cart-block .wc-block-grid__product {
	--prote-product-badge-inset: clamp(0.75rem, 1.5vw, 1rem);

	& .wc-block-grid__product-image img {
		padding: clamp(1.15rem, 2.5vw, 2rem);
		border-radius: 1rem;
		background: var(--prote-surface);
	}

	& .wc-block-grid__product-add-to-cart .wp-block-button__link {
		border-radius: 999px;
	}
}

.prote-free-shipping {
	--prote-free-shipping-color: #0f834d;
	--prote-free-shipping-bar-color: color-mix(
		in oklch,
		#4a9a3f,
		var(--prote-free-shipping-color) var(--prote-free-shipping-progress)
	);

	margin: 0 0 1em;
	padding: 0.85em 1em;
	border-radius: 8px;
	color: var(--prote-free-shipping-color);
	font-size: 0.875rem;
	line-height: 1.35;

	&.prote-free-shipping--inactive {
		--prote-free-shipping-color: var(--prote-muted);
		--prote-free-shipping-bar-color: var(--prote-free-shipping-color);
	}

	&.prote-free-shipping--reached {
		& .prote-free-shipping__message::before {
			content: "\f058";
			border-radius: 50%;
			line-height: 1;
			will-change: transform;
			animation: prote-free-shipping-reward 1s
				cubic-bezier(0.16, 1, 0.3, 1);

			@media (prefers-reduced-motion: reduce) {
				animation: none;
			}
		}
	}

	& .prote-free-shipping__message {
		margin: 0 0 0.6em;

		&::before {
			-webkit-font-smoothing: antialiased;
			-moz-osx-font-smoothing: grayscale;
			content: "\f0d1";
			display: inline-block;
			margin-right: 0.45em;
			font-family: "Font Awesome 5 Free";
			font-weight: 900;
		}
	}

	& .prote-free-shipping__track {
		height: 6px;
		overflow: hidden;
		border-radius: 999px;
		background: color-mix(
			in srgb,
			var(--prote-free-shipping-bar-color),
			transparent 80%
		);
	}

	& .prote-free-shipping__bar {
		width: var(--prote-free-shipping-progress);
		height: 100%;
		border-radius: inherit;
		background: var(--prote-free-shipping-bar-color);
		transition: width 0.4s ease;

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

	& .prote-free-shipping__input {
		width: 100%;
		margin-top: 0.75em;
		padding: 0.5em 0.75em;
		border: 1px solid var(--prote-line);
		border-radius: 6px;
		background: var(--prote-page);
		color: var(--prote-ink);
		font: inherit;
		/* Important to avoid handheld zoom in on focus. */
		font-size: 1rem;
	}

	& .prote-free-shipping__postcode {
		margin: 0.6em 0 0;
		color: var(--prote-muted);
		font-size: 0.8125rem;

		& button {
			padding: 0;
			border: 0;
			background: none;
			color: inherit;
			font: inherit;
			text-decoration: underline;
			cursor: pointer;
		}
	}
}

@keyframes prote-free-shipping-reward {
	0% {
		transform: scale(0.5);
	}
	30% {
		transform: scale(1.2);
		box-shadow: 0 0 0 0 var(--prote-free-shipping-color);
	}
	100% {
		box-shadow: 0 0 0 0.5em transparent;
	}
}
