/* Mini cart: icon + badge in the header, slide-in dialog panel from the right.
   Brand colours (ProjectFiles/mo-colours.css): #218739 primary, #c3e4cb / #1c5028 secondary,
   #d32f2f red, #000 header black, #6b6b6b muted text. */

.mo-mini-cart {
	position: relative;
	display: inline-flex;
}

.mo-mini-cart__toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	background: transparent;
	border: none;
	cursor: pointer;
	padding: 0;
	text-decoration: none;
}

.mo-mini-cart__badge {
	position: absolute;
	top: 1px;
	right: 1px;
	min-width: 18px;
	height: 18px;
	padding: 0 4px;
	border-radius: 999px;
	background: #d32f2f;
	border: 1.5px solid #000;
	color: #fff;
	font-size: 11px;
	font-weight: 700;
	line-height: 17px;
	text-align: center;
}

/* Overlay + panel, class-based open state (not the hidden attribute: display:none cannot
   transition, so hidden would make the slide-in/out snap instead of animate). Visibility is
   delayed by the transition itself, so the panel is non-interactive and out of the tab order
   while closed without blocking the animation the way display:none would. */

.mo-mini-cart__overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 9998;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease, visibility 0s linear 0.25s;
}

.mo-mini-cart__overlay.is-open {
	opacity: 1;
	visibility: visible;
	transition: opacity 0.25s ease, visibility 0s linear 0s;
}

.mo-mini-cart__panel {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	width: min(420px, 100vw);
	background: #fff;
	z-index: 9999;
	display: flex;
	flex-direction: column;
	box-shadow: -8px 0 32px rgba(0, 0, 0, 0.18);
	transform: translateX(100%);
	visibility: hidden;
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.3s;
}

.mo-mini-cart__panel.is-open {
	transform: translateX(0);
	visibility: visible;
	transition: transform 0.3s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0s;
}

/* Header: title + live subtotal on the left, close on the right */

.mo-mini-cart__header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 1em;
	padding: 1.2em 1.4em;
	border-bottom: 1px solid #ececec;
	flex-shrink: 0;
}

.mo-mini-cart__header-text {
	display: flex;
	flex-direction: column;
	gap: 0.2em;
}

.mo-mini-cart__title {
	margin: 0;
	font-size: 1.15em;
	font-weight: 700;
	color: #1a1a1a;
	line-height: 1.3;
}

.mo-mini-cart__header-subtotal {
	font-size: 0.9em;
	font-weight: 600;
	color: #218739;
}

.mo-mini-cart__close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	flex-shrink: 0;
	border-radius: 999px;
	color: #444;
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.mo-mini-cart__close:hover,
.mo-mini-cart__close:focus-visible {
	background: #f1f1f1;
	color: #000;
}

/* Body: scroll area + pinned footer, loading overlay sits over the whole thing */

.mo-mini-cart__body-wrap {
	position: relative;
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
}

.mo-mini-cart__body {
	flex: 1;
	min-height: 0;
	display: flex;
	flex-direction: column;
	transition: filter 0.15s ease, opacity 0.15s ease;
}

.mo-mini-cart__body--busy {
	filter: blur(2px);
	opacity: 0.6;
	pointer-events: none;
}

.mo-mini-cart__scroll {
	flex: 1;
	min-height: 0;
	overflow-y: auto;
	padding: 1.2em 1.4em 0.4em;
}

.mo-mini-cart__footer {
	flex-shrink: 0;
	padding: 1em 1.4em 1.4em;
	border-top: 1px solid #ececec;
	background: #fff;
}

/* [hidden] and this class carry equal specificity, and an author rule always beats the browser's
   own [hidden]{display:none} regardless of order, so display is only turned on for the
   not-hidden case instead of being set unconditionally here. */
.mo-mini-cart__loading {
	position: absolute;
	inset: 0;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.mo-mini-cart__loading:not([hidden]) {
	display: flex;
}

.mo-mini-cart__spinner {
	width: 32px;
	height: 32px;
	border-radius: 999px;
	border: 3px solid #d7ead9;
	border-top-color: #218739;
	animation: mo-mini-cart-spin 0.7s linear infinite;
}

@keyframes mo-mini-cart-spin {
	to {
		transform: rotate(360deg);
	}
}

/* Empty state */

.mo-mini-cart__empty {
	margin: 0 0 1.2em;
	padding: 1.2em 1.4em 0;
	color: #444;
	font-size: 1.02em;
}

.mo-mini-cart__shop-link {
	margin: 0 1.4em;
	width: calc(100% - 2.8em) !important;
}

/* Items */

.mo-mini-cart__items {
	list-style: none;
	margin: 0 0 0.8em;
	padding: 0;
}

.mo-mini-cart__item {
	display: flex;
	gap: 0.9em;
	padding: 1em 0;
	border-bottom: 1px solid #f0f0f0;
	align-items: flex-start;
}

.mo-mini-cart__item-thumb img {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border-radius: 6px;
	border: 1px solid #eee;
}

.mo-mini-cart__item-body {
	position: relative;
	flex: 1;
	min-width: 0;
	padding-right: 1.6em;
}

.mo-mini-cart__item-name {
	display: block;
	font-size: 0.95em;
	font-weight: 600;
	color: #1a1a1a;
	text-decoration: none;
	line-height: 1.35;
}

a.mo-mini-cart__item-name:hover {
	color: #218739;
}

.mo-mini-cart__item-attributes {
	margin: 0.2em 0 0;
	font-size: 0.82em;
	color: #6b6b6b;
}

.mo-mini-cart__item-rebate {
	margin: 0.25em 0 0;
	font-size: 0.8em;
	color: #1c5028;
}

.mo-mini-cart__item-rebate .woocommerce-Price-amount {
	font-weight: 700;
}

.mo-mini-cart__item-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 0.65em;
}

/* Quantity stepper: anchor steppers either side of a real, editable number input */

.mo-mini-cart__qty {
	display: inline-flex;
	align-items: center;
	height: 32px;
	border: 1px solid #dcdcdc;
	border-radius: 999px;
	background: #fafafa;
	overflow: hidden;
	transition: opacity 0.15s ease;
}

.mo-mini-cart__qty--pending {
	opacity: 0.55;
	pointer-events: none;
}

.mo-mini-cart__qty-btn {
	width: 30px;
	height: 30px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 1.05em;
	line-height: 1;
	color: #333;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
	-webkit-user-select: none;
	user-select: none;
}

.mo-mini-cart__qty-btn:hover,
.mo-mini-cart__qty-btn:focus-visible {
	background: #218739;
	color: #fff;
}

.mo-mini-cart__qty-input {
	width: 2.6em;
	height: 30px;
	border: none;
	border-left: 1px solid #dcdcdc;
	border-right: 1px solid #dcdcdc;
	background: transparent;
	text-align: center;
	font-size: 0.9em;
	font-weight: 600;
	color: #1a1a1a;
	-moz-appearance: textfield;
	appearance: textfield;
	padding: 0;
}

.mo-mini-cart__qty-input::-webkit-outer-spin-button,
.mo-mini-cart__qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.mo-mini-cart__item-subtotal {
	font-size: 0.92em;
	font-weight: 700;
	color: #1a1a1a;
}

/* Remove link, top-right corner of the item body */

.mo-mini-cart__remove {
	position: absolute;
	top: 0;
	right: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 26px;
	height: 26px;
	border-radius: 999px;
	color: #999;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease, color 0.15s ease;
}

.mo-mini-cart__remove:hover,
.mo-mini-cart__remove:focus-visible {
	background: #fdeceb;
	color: #d32f2f;
}

/* Platinum rows */

.mo-mini-cart__item--platinum {
	padding-left: 2.9em;
}

.mo-mini-cart__item--platinum .mo-mini-cart__item-name {
	font-weight: 500;
	color: #444;
}

.mo-mini-cart__item--platinum-add {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.6em;
	padding: 0.8em 0 0.8em 2.9em;
	font-size: 0.85em;
	border-bottom: 1px solid #f0f0f0;
}

.mo-mini-cart__platinum-add-label {
	flex-basis: 100%;
	color: #555;
	font-weight: 600;
}

.mo-mini-cart__platinum-add-select {
	flex: 1;
	min-width: 0;
	padding: 0.4em 0.5em;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.95em;
}

.mo-mini-cart__platinum-add-btn {
	padding: 0.4em 1em;
	border-radius: 4px;
	font-size: 0.9em;
	font-weight: 600;
}

/* Coupon */

.mo-mini-cart__coupon {
	border-top: 1px solid #eee;
	padding-top: 1.1em;
	margin-bottom: 1.1em;
}

.mo-mini-cart__coupon-label {
	display: block;
	font-weight: 600;
	font-size: 0.9em;
	margin-bottom: 0.4em;
	color: #1a1a1a;
}

.mo-mini-cart__coupon-row {
	display: flex;
	gap: 0.5em;
}

.mo-mini-cart__coupon-input {
	flex: 1;
	min-width: 0;
	padding: 0.55em 0.7em;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.95em;
}

/* input[type=submit], not a link or a button: resets the native OS button chrome so it matches
   the rest of the drawer's controls instead of looking like a default form input. */
.mo-mini-cart__coupon-btn {
	-webkit-appearance: none;
	appearance: none;
	font-family: inherit;
	padding: 0.55em 1.1em;
	border-radius: 4px;
	font-size: 0.9em;
	font-weight: 600;
	white-space: nowrap;
}

.mo-mini-cart__coupon-applied {
	margin: 0;
	font-size: 0.9em;
	color: #1c5028;
}

.mo-mini-cart__coupon-result {
	margin: 0.6em 0 0;
	font-size: 0.85em;
}

.mo-mini-cart__coupon-result:empty {
	margin: 0;
}

/* Shipping estimator */

.mo-mini-cart__shipping-estimate {
	border-top: 1px solid #eee;
	padding-top: 1.1em;
	margin-bottom: 0.4em;
}

.mo-mini-cart__shipping-label {
	display: block;
	font-weight: 600;
	font-size: 0.9em;
	margin-bottom: 0.4em;
	color: #1a1a1a;
}

.mo-mini-cart__shipping-row {
	display: flex;
	gap: 0.5em;
}

.mo-mini-cart__shipping-input {
	flex: 1;
	min-width: 0;
	padding: 0.55em 0.7em;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.95em;
}

.mo-mini-cart__shipping-btn {
	padding: 0.55em 1.1em;
	border-radius: 4px;
	font-size: 0.9em;
	font-weight: 600;
	white-space: nowrap;
}

.mo-mini-cart__shipping-result {
	margin: 0.6em 0 0;
	font-size: 0.85em;
	color: #1a1a1a;
}

.mo-mini-cart__shipping-result:empty {
	margin: 0;
}

.mo-mini-cart__tax-note {
	margin: 0.5em 0 0;
	font-size: 0.78em;
	color: #6b6b6b;
}

/* Footer: totals + actions, pinned, never scrolls with the item list */

.mo-mini-cart__totals {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 1.05em;
	font-weight: 700;
	color: #1a1a1a;
	margin-bottom: 1em;
}

.mo-mini-cart__actions {
	display: flex;
	flex-direction: column;
	gap: 0.6em;
}

.mo-mini-cart__actions .mo-btn-primary,
.mo-mini-cart__actions .mo-btn-secondary,
.mo-mini-cart__shop-link {
	display: block;
	text-align: center;
	width: 100%;
	padding: 0.85em 1em;
	border-radius: 4px;
	font-weight: 700;
	text-decoration: none;
	box-sizing: border-box;
}

/* No dark variant: the canvas mini cart is a white panel in every colour scheme */

/* Canvas mini cart: white panel, engine line with Our price and Remove, every control 44px */
.mo-mini-cart__panel,
.mo-mini-cart__panel .mo-mini-cart__footer { background: #fff !important; color: #1a1a1a !important; }
.mo-mini-cart__panel .mo-mini-cart__title { color: #1a1a1a !important; }
.mo-mini-cart__panel .mo-mini-cart__close { min-width: 44px; min-height: 44px; display: inline-flex; align-items: center; justify-content: center; }
.mo-mini-cart__item-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.mo-mini-cart__item-price { display: inline-flex; align-items: baseline; gap: 6px; font-size: 15px; color: #1a1a1a; }
.mo-mini-cart__item-price-label { font-size: 14px; color: #555; }
.mo-mini-cart__panel a.mo-mini-cart__remove--text { position: static; display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; padding: 0 4px; width: auto; height: auto; background: none; color: #1c5028 !important; font-size: 14px; font-weight: 600; text-decoration: underline; border-radius: 4px; }
.mo-mini-cart__panel a.mo-mini-cart__remove--text:hover,
.mo-mini-cart__panel a.mo-mini-cart__remove--text:focus-visible { background: #f1f5f2; color: #1c5028 !important; }
.mo-mini-cart__panel .mo-mini-cart__shipping-estimate { margin: 12px 0 0; }
.mo-mini-cart__panel .mo-mini-cart__shipping-input,
.mo-mini-cart__panel .mo-mini-cart__shipping-btn,
.mo-mini-cart__panel .mo-mini-cart__checkout,
.mo-mini-cart__panel .mo-mini-cart__view-cart { min-height: 44px; }
.mo-mini-cart__panel .mo-mini-cart__item-name { min-height: 24px; }
.mo-mini-cart__panel .mo-mini-cart__item-thumb a { display: block; }
.mo-mini-cart__panel .mo-mini-cart__tax-note { margin: 8px 0 0; font-size: 14px; color: #555; }

.mo-mini-cart__panel .mo-mini-cart__shipping-estimate { display: block !important; }
.mo-mini-cart__panel .mo-mini-cart__shipping-input { min-height: 44px; height: 44px !important; }
.mo-mini-cart__panel .mo-mini-cart__shipping-btn { min-height: 44px !important; }
.mo-mini-cart__panel a.mo-mini-cart__item-name { display: flex; align-items: center; min-height: 44px; }
