/* =========================================================
   MB Cart – cart page, coupon field, header icon and order summary
   Colours from the Ollie palette. The flyout has its own file: assets/flyout.css
   ========================================================= */

/* Remove links */
a.js-clear-cart,
a.remove-link {
	color: var(--wp--preset--color--secondary);
	font-size: .8em !important;
	text-decoration: none;
}
a.js-clear-cart:hover,
a.remove-link:hover {
	text-decoration: underline;
}

/* Gravity Forms coupon field (form 4) */
input#gf_coupon_code_4 {
	height: 30px;
	border-style: none;
}
input#gf_coupon_button {
	border: none;
	background-color: transparent !important;
}
a.remove-coupon {
	padding-right: 5px;
	color: var(--wp--preset--color--secondary);
	text-decoration: none;
}
.gf_coupon_name,
.gf_coupon_discount {
	color: var(--wp--preset--color--main) !important;
}
.gf_coupon_discount {
	margin-left: 5px !important;
}

/* Cart table ([gf_cart_items]) */
.gf-cart-placeholder .gf-cart-table {
	width: 100%;
	margin-top: 20px !important;
	border-collapse: collapse;
	background: var(--wp--preset--color--tertiary);
}
.gf-cart-placeholder .gf-cart-table th,
.gf-cart-placeholder .gf-cart-table td {
	padding: 6px;
	border: none;
	line-height: 1.2em;
	text-align: left;
	vertical-align: top;
}
.gf-cart-placeholder .gf-cart-table th {
	border-bottom: 1px solid var(--wp--preset--color--border-light);
	background: var(--wp--preset--color--border-light);
	color: var(--wp--preset--color--main);
	font-size: .8em;
	font-weight: 100;
	text-transform: uppercase;
}
.gf-cart-placeholder .gf-cart-table .col-product {
	width: 96px; /* the image size depends on this width and the padding */
	padding-left: 10px;
	white-space: nowrap;
}
.gf-cart-placeholder .gf-cart-table .col-product img {
	display: block;
	width: 84px;
	height: 84px;
	border-radius: var(--wp--preset--border-radius--xs, 4px);
	object-fit: cover;
	object-position: center 10%;
}
.gf-cart-placeholder .gf-cart-table .col-details a,
.gf-cart-placeholder .gf-cart-table .col-details em {
	font-size: .85em;
}
.gf-cart-placeholder .gf-cart-table tbody td {
	border-bottom: 1px solid var(--wp--preset--color--border-light);
}
.gf-cart-placeholder .gf-cart-table .col-price {
	width: 119px;
	font-size: .9em;
	letter-spacing: 1px;
}
.gf-cart-placeholder .gf-cart-table tfoot td {
	font-size: .9em;
}
.gf-cart-placeholder .gf-cart-table tfoot td:first-child {
	text-align: right;
}
.gf-cart-placeholder .gf-cart-table tr[hidden] {
	display: none;
}

/* Deposit note next to the buy button ([mb_deposit_note]) */
.mb-deposit-note {
	color: var(--wp--preset--color--secondary);
	font-size: var(--wp--preset--font-size--x-small, .85rem);
}

/* Header shopping bag ([gf_cart_icon_v2]) */
.gf-cart-trigger {
	display: inline-flex;
	position: relative;
	top: 3px;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	color: var(--wp--preset--color--main);
}
.gf-cart-trigger:hover {
	color: var(--wp--preset--color--primary);
}
.gf-cart-trigger svg {
	display: block;
	z-index: -1; /* keeps the icon from covering the dark mode switch's tooltip */
	width: 100%;
	height: 100%;
}
.gf-cart-trigger.has-items .gf-cart-dot {
	display: block;
	position: absolute;
	top: -4px;
	right: -4px;
	width: 8px;
	height: 8px;
	border-radius: 50%;
	background: var(--wp--preset--color--secondary);
}

/* Order summary ([render_cart_items]) */
table.cart-summary {
	border: 1px solid var(--wp--preset--color--tertiary);
	font-size: .9em;
}
table.cart-summary th,
table.cart-summary td {
	padding-left: 12px;
	text-align: left;
}
table.cart-summary thead th {
	background: var(--wp--preset--color--tertiary);
}
table.cart-summary tbody td {
	border-bottom: 1px solid var(--wp--preset--color--tertiary);
}
table.cart-summary tfoot {
	background: var(--wp--preset--color--base);
}
table.cart-summary tfoot td:first-child {
	text-align: right;
}
