/* Native WoodMart mini-cart, presented in the EMS header's existing cart control. */
body.ems-cart-drawer-open {
	overflow: hidden;
}

.ems-cart-drawer-backdrop {
	position: fixed;
	inset: 0;
	z-index: 1100;
	background: rgb(0 0 0 / 56%);
}

.ems-cart-drawer {
	position: fixed;
	top: 0;
	right: 0;
	z-index: 1101;
	display: flex;
	width: min(100vw, 430px);
	height: 100dvh;
	min-width: 0;
	flex-direction: column;
	background: #fff;
	box-shadow: -16px 0 34px rgb(0 0 0 / 22%);
	color: #17191c;
}

.ems-cart-drawer[hidden],
.ems-cart-drawer-backdrop[hidden] {
	display: none;
}

.ems-cart-drawer__header {
	display: flex;
	min-height: 64px;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 18px;
	border-bottom: 1px solid #e1e4e8;
}

.ems-cart-drawer__header h2 {
	margin: 0;
	color: #17191c;
	font-size: 1.15rem;
	font-weight: 750;
	letter-spacing: 0;
}

.ems-cart-drawer__close {
	width: 40px;
	height: 40px;
	padding: 8px;
	border: 1px solid #d9dee5;
	border-radius: 3px;
	background: #fff;
	color: #17191c;
}

.ems-cart-drawer__close:hover {
	border-color: #17191c;
}

.ems-cart-drawer .widget_shopping_cart_content {
	display: flex;
	min-height: 0;
	flex: 1 1 auto;
	flex-direction: column;
}

.ems-cart-drawer .shopping-cart-widget-body {
	min-height: 0;
	flex: 1 1 auto;
	padding: 0 18px;
	overflow: auto;
	overscroll-behavior: contain;
}

.ems-cart-drawer .shopping-cart-widget-footer {
	padding: 16px 18px calc(16px + env(safe-area-inset-bottom));
	border-top: 1px solid #e1e4e8;
	background: #fff;
}

.ems-cart-drawer .woocommerce-mini-cart__buttons {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 10px;
	margin: 14px 0 0;
}

.ems-cart-drawer .woocommerce-mini-cart__buttons .button {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	margin: 0;
	padding: 10px 12px;
	border-radius: 3px;
	font-size: .88rem;
	font-weight: 750;
	line-height: 1.2;
	text-align: center;
}

.ems-cart-drawer .woocommerce-mini-cart__buttons .checkout {
	border-color: #f97316;
	background: #f97316;
	color: #17191c;
}

.ems-cart-drawer .woocommerce-mini-cart__buttons .checkout:hover {
	border-color: #dc5b08;
	background: #dc5b08;
	color: #17191c;
}

.ems-cart-drawer .woocommerce-mini-cart__total {
	margin: 0;
	color: #17191c;
	font-size: .95rem;
}

.ems-cart-drawer .woocommerce-mini-cart-item {
	min-width: 0;
}

.ems-cart-drawer .woocommerce-mini-cart-item .cart-info {
	min-width: 0;
}

.ems-cart-drawer .woocommerce-mini-cart-item .wd-entities-title,
.ems-cart-drawer .woocommerce-mini-cart-item .wd-entities-title a {
	color: #17191c;
	font-weight: 700;
}

.ems-cart-drawer .wd-empty-mini-cart {
	padding: 34px 0;
	text-align: center;
}

.ems-cart-drawer .wd-empty-mini-cart .wc-backward {
	display: inline-flex;
	min-height: 44px;
	align-items: center;
	justify-content: center;
	margin-top: 6px;
	padding: 10px 16px;
}

.ems-cart-drawer :where(a, button, input):focus-visible {
	outline: 3px solid #1268a5;
	outline-offset: 3px;
}

@media (max-width: 480px) {
	.ems-cart-drawer {
		width: 100vw;
	}

	.ems-cart-drawer__header {
		padding-inline: 14px;
	}

	.ems-cart-drawer .shopping-cart-widget-body,
	.ems-cart-drawer .shopping-cart-widget-footer {
		padding-inline: 14px;
	}

	.ems-cart-drawer .woocommerce-mini-cart__buttons {
		grid-template-columns: 1fr;
	}
}
