/*
 * The client's cart style on the cart page and the sidebar Cart widget.
 * Loaded by mu-plugins/sw_mu.php, which explains the setup. The blue is the
 * site's accent; the buttons keep the site's Add to Cart lime.
 */

/* Free shipping banner, used in both places. */
.aqua-ship {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 12px;
	background-color: #eaf7fd;
	border: 1px solid #b9e2f5;
	border-radius: 4px;
	color: #333;
	font-weight: 600;
	line-height: 1.3;
	text-align: center;
}

.aqua-ship svg {
	display: block;
	fill: none;
	stroke: #28aade;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.aqua-ship .aqua-ship__truck {
	display: flex;
	flex: none;
}

.aqua-ship .aqua-ship__truck svg {
	width: 24px;
	height: 24px;
	stroke-width: 1.8;
}

.aqua-ship .aqua-ship__info,
.aqua-ship .aqua-ship__info:hover,
.aqua-ship .aqua-ship__info:focus {
	display: flex;
	flex: none;
	width: auto;
	margin: 0;
	padding: 2px;
	background: none;
	border: 0;
	border-radius: 50%;
	box-shadow: none;
	cursor: help;
	line-height: 1;
}

.aqua-ship .aqua-ship__info svg {
	width: 17px;
	height: 17px;
	stroke-width: 2;
}

.aqua-ship .aqua-ship__info:focus-visible {
	outline: 2px solid #28aade;
	outline-offset: 1px;
}

/* Note shown above the banner on hover, focus or tap. */
.aqua-ship .aqua-ship__note {
	position: absolute;
	bottom: calc(100% + 6px);
	left: 50%;
	z-index: 5;
	width: max-content;
	max-width: 220px;
	padding: 6px 10px;
	background-color: #fff;
	border: 1px solid #b9e2f5;
	border-radius: 4px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
	color: #333;
	font-size: 14px;
	font-weight: 400;
	line-height: 1.4;
	transform: translateX(-50%);
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.15s, visibility 0.15s;
	pointer-events: none;
}

.aqua-ship .aqua-ship__info:hover + .aqua-ship__note,
.aqua-ship .aqua-ship__info:focus + .aqua-ship__note {
	visibility: visible;
	opacity: 1;
}

/* Cart page: banner at the top of Cart totals, an arrow on Proceed to
   Checkout, and Continue Shopping under the checkout options. */
.woocommerce .cart_totals .aqua-cart-ship {
	margin: 0 0 20px;
	font-size: 17px;
}

.woocommerce .wc-proceed-to-checkout a.checkout-button,
.widget_shopping_cart .woocommerce-mini-cart__buttons a.aqua-mc-checkout {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.woocommerce .wc-proceed-to-checkout a.checkout-button::after,
.widget_shopping_cart .woocommerce-mini-cart__buttons a.aqua-mc-checkout::after {
	content: "";
	flex: none;
	width: 18px;
	height: 18px;
	background-color: currentColor;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") no-repeat center / contain;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") no-repeat center / contain;
}

.woocommerce .wc-proceed-to-checkout .aqua-cart-continue {
	margin: 16px 0 0;
	text-align: center;
}

.woocommerce .wc-proceed-to-checkout .aqua-cart-continue a,
.woocommerce.widget_shopping_cart p.aqua-mc-continue a,
.widget_shopping_cart .aqua-mc-continue a {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* Sidebar Cart widget. */
.widget_shopping_cart .cart_list li.aqua-mc-ship-item {
	padding: 15px 0 5px;
	border: 0;
}

.widget_shopping_cart .aqua-mc-ship-item .aqua-ship {
	font-size: 15px;
}

.widget_shopping_cart .aqua-mc-count {
	color: #666;
	font-weight: 400;
}

.widget_shopping_cart .woocommerce-mini-cart__buttons a.aqua-mc-checkout {
	width: 100%;
	margin: 0;
	padding: 14px 16px;
	box-sizing: border-box;
}

.widget_shopping_cart .aqua-mc-continue {
	margin: 12px 0 0;
	text-align: center;
}
