/**
 * Rich & Well × XootiX Side Cart — polished drawer UI.
 * Brand: navy #050e17 · blue #1452b1 · green #42841f · gold #ffc00a
 */

/* Hide plugin floating basket — header bag is the trigger */
.xoo-wsc-basket {
	display: none !important;
}

.raw-header-cart {
	cursor: pointer;
}

/* ── Overlay ─────────────────────────────────────────── */
.xoo-wsc-opac {
	background: rgba(5, 14, 23, 0.62) !important;
	backdrop-filter: blur(2px);
	-webkit-backdrop-filter: blur(2px);
}

/* ── Panel shell ──────────────────────────────────────── */
.xoo-wsc-container {
	border-left: 1px solid rgba(20, 82, 177, 0.28) !important;
	box-shadow: -18px 0 48px rgba(5, 14, 23, 0.28) !important;
	background: #fff !important;
	overflow: hidden;
}

.xoo-wsc-markup *::-webkit-scrollbar {
	width: 6px;
}

.xoo-wsc-markup *::-webkit-scrollbar-track {
	background: #f3f5f8;
	border-radius: 999px;
}

.xoo-wsc-markup *::-webkit-scrollbar-thumb {
	background: rgba(20, 82, 177, 0.35);
	border-radius: 999px;
}

/* ── Header ───────────────────────────────────────────── */
.xoo-wsc-header {
	position: relative;
	background: linear-gradient(135deg, #050e17 0%, #0a1a2e 55%, #0f2744 100%) !important;
	color: #fff !important;
	border-bottom: 0 !important;
	padding: 18px 20px !important;
	box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.08);
}

.xoo-wsc-header::after {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 3px;
	background: linear-gradient(90deg, #1452b1 0%, #42841f 55%, #ffc00a 100%);
}

.xoo-wsc-header .xoo-wsc-sch-hdtxt,
.xoo-wsc-header .xoo-wsc-scbktxt,
.xoo-wsc-header span,
.xoo-wsc-header a {
	color: #fff !important;
}

.xoo-wsc-header .xoo-wsc-sch-hdtxt,
.xoo-wsch-text {
	font-weight: 700 !important;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	font-size: 13px !important;
}

.xoo-wsc-header .xoo-wsch-close,
.xoo-wsc-header .xoo-wsc-close {
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 999px;
	width: 34px;
	height: 34px;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.xoo-wsc-header .xoo-wsch-close:hover,
.xoo-wsc-header .xoo-wsc-close:hover {
	background: rgba(255, 255, 255, 0.1);
	border-color: rgba(255, 255, 255, 0.45);
	transform: scale(1.04);
}

/* ── Body / product rows ──────────────────────────────── */
.xoo-wsc-body {
	background: #f7f9fc !important;
	padding: 14px 14px 8px !important;
}

.xoo-wsc-products:not(.xoo-wsc-pattern-card) .xoo-wsc-product {
	background: #fff !important;
	border: 1px solid rgba(20, 82, 177, 0.12) !important;
	border-radius: 14px !important;
	padding: 12px !important;
	margin: 0 0 12px !important;
	box-shadow: 0 4px 14px rgba(5, 14, 23, 0.04);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.xoo-wsc-products:not(.xoo-wsc-pattern-card) .xoo-wsc-product:hover {
	border-color: rgba(20, 82, 177, 0.28) !important;
	box-shadow: 0 8px 22px rgba(5, 14, 23, 0.08);
}

.xoo-wsc-pattern-card .xoo-wsc-product {
	border: 1px solid rgba(20, 82, 177, 0.12) !important;
	border-radius: 14px !important;
	overflow: hidden;
	box-shadow: 0 4px 14px rgba(5, 14, 23, 0.04);
}

.xoo-wsc-img-col img,
.xoo-wsc-products:not(.xoo-wsc-pattern-card) .xoo-wsc-img-col img {
	border: 1px solid rgba(20, 82, 177, 0.1);
	border-radius: 10px !important;
	background: #f4f6f9;
}

.xoo-wsc-product-name a,
.xoo-wsc-products:not(.xoo-wsc-pattern-card) a {
	color: #050e17 !important;
	font-weight: 600 !important;
	letter-spacing: 0.01em;
}

.xoo-wsc-product-name a:hover {
	color: #1452b1 !important;
}

.xoo-wsc-products .amount,
.xoo-wsc-sm-info .amount {
	color: #1452b1 !important;
	font-weight: 700 !important;
}

.xoo-wsc-smr-del,
.xoo-wsc-remove {
	color: #6b7280 !important;
	border: 1px solid rgba(107, 114, 128, 0.25);
	border-radius: 999px;
	width: 28px;
	height: 28px;
	display: inline-flex !important;
	align-items: center;
	justify-content: center;
	transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.xoo-wsc-smr-del:hover,
.xoo-wsc-remove:hover {
	color: #b32d2e !important;
	border-color: rgba(179, 45, 46, 0.45);
	background: rgba(179, 45, 46, 0.06);
}

/* Qty controls */
.xoo-wsc-qty-box,
.xoo-wsc-qty {
	border: 1px solid rgba(20, 82, 177, 0.18) !important;
	border-radius: 999px !important;
	overflow: hidden;
	background: #fff;
}

.xoo-wsc-qty-box input,
.xoo-wsc-qty input {
	border: 0 !important;
	font-weight: 600;
	color: #050e17;
}

/* Empty state */
.xoo-wsc-empty-cart {
	padding: 28px 16px !important;
	text-align: center;
}

.xoo-wsc-emp-txt {
	color: #4b5563 !important;
	font-weight: 600;
	letter-spacing: 0.02em;
}

.xoo-wsc-empty-cart .xoo-wsc-btn {
	margin-top: 14px;
	border-radius: 999px !important;
	border: 1px solid #1452b1 !important;
	background: #1452b1 !important;
	color: #fff !important;
	padding: 10px 22px !important;
	font-weight: 600 !important;
}

/* ── Footer ───────────────────────────────────────────── */
.xoo-wsc-footer {
	background: #fff !important;
	border-top: 1px solid rgba(20, 82, 177, 0.14) !important;
	box-shadow: 0 -10px 28px rgba(5, 14, 23, 0.06);
	padding: 16px 18px 18px !important;
}

.xoo-wsc-ft-totals,
.xoo-wsc-ft-amt-label,
.xoo-wsc-ft-amt-value {
	color: #050e17 !important;
}

.xoo-wsc-ft-amt {
	border-bottom: 1px dashed rgba(20, 82, 177, 0.18);
	padding: 6px 0;
}

.xoo-wsc-ft-amt:last-child {
	border-bottom: 0;
}

.xoo-wsc-ft-buttons-cont {
	gap: 10px !important;
	margin-top: 12px;
	/* Narrow drawer: always stack so long labels stay one line */
	grid-template-columns: 1fr !important;
}

.xoo-wsc-ft-buttons-cont a.xoo-wsc-ft-btn:nth-child(1) {
	grid-column: 1 / -1 !important;
}

.xoo-wsc-ft-buttons-cont a.xoo-wsc-ft-btn-checkout {
	grid-column: 1 / -1 !important;
}

.xoo-wsc-ft-buttons-cont a.xoo-wsc-ft-btn,
.xoo-wsc-container .xoo-wsc-btn {
	border-radius: 999px !important;
	font-weight: 700 !important;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	font-size: 12px !important;
	padding: 12px 16px !important;
	transition: transform 0.15s ease, box-shadow 0.2s ease, background 0.2s ease, border-color 0.2s ease !important;
	border-width: 1.5px !important;
	border-style: solid !important;
	flex-wrap: nowrap !important;
	box-sizing: border-box !important;
}

.xoo-wsc-ft-btn-checkout {
	background: linear-gradient(135deg, #42841f 0%, #6cb833 100%) !important;
	border-color: #42841f !important;
	color: #fff !important;
	box-shadow: 0 8px 18px rgba(66, 132, 31, 0.28);
}

.xoo-wsc-ft-btn-checkout:hover {
	transform: translateY(-1px);
	box-shadow: 0 10px 22px rgba(66, 132, 31, 0.36);
	filter: brightness(1.03);
}

.xoo-wsc-ft-btn-cart {
	background: #1452b1 !important;
	border-color: #1452b1 !important;
	color: #fff !important;
	box-shadow: 0 8px 18px rgba(20, 82, 177, 0.24);
}

.xoo-wsc-ft-btn-cart:hover {
	background: #0f4191 !important;
	border-color: #0f4191 !important;
	transform: translateY(-1px);
}

.xoo-wsc-ft-btn-continue {
	background: transparent !important;
	border-color: rgba(20, 82, 177, 0.45) !important;
	color: #1452b1 !important;
	box-shadow: none !important;
	grid-column: 1 / -1 !important;
	font-size: 12px !important;
	letter-spacing: 0.03em !important;
	padding: 12px 16px !important;
	line-height: 1.2 !important;
	white-space: nowrap !important;
	flex-wrap: nowrap !important;
	overflow: visible !important;
	text-overflow: clip !important;
	box-sizing: border-box !important;
	width: 100% !important;
	max-width: 100% !important;
}

.xoo-wsc-ft-btn-continue:hover {
	background: rgba(20, 82, 177, 0.06) !important;
	border-color: #1452b1 !important;
}

/* Footer notice / shipping note */
.xoo-wsc-footer .xoo-wsc-payment-btns,
.xoo-wsc-footer .xoo-wsc-ft-ship,
.xoo-wsc-footer p {
	color: #6b7280 !important;
	font-size: 12px;
}

/* ── Qty +/- ─────────────────────────────────────────── */
.raw-wsc-qty {
	display: inline-flex;
	align-items: center;
	gap: 0;
	margin: 8px 0 6px;
	border: 1px solid rgba(20, 82, 177, 0.28);
	border-radius: 999px;
	overflow: hidden;
	background: #fff;
}

.raw-wsc-qty-btn {
	width: 30px;
	height: 30px;
	border: 0;
	background: #f3f6fb;
	color: #1452b1;
	font-size: 16px;
	font-weight: 700;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	transition: background 0.12s ease, color 0.12s ease;
}

.raw-wsc-qty-btn:hover:not(:disabled) {
	background: #1452b1;
	color: #fff;
}

.raw-wsc-qty-btn:disabled {
	opacity: 0.35;
	cursor: not-allowed;
}

.raw-wsc-qty-val {
	min-width: 2rem;
	text-align: center;
	font-size: 13px;
	font-weight: 700;
	color: #050e17;
	padding: 0 4px;
}

.xoo-wsc-sml-qty {
	display: none !important;
}

/* ── Per-item loading (hide full-cart fog) ───────────── */
.xoo-wsc-product {
	position: relative;
}

.raw-wsc-item-loader {
	display: none;
	position: absolute;
	inset: 0;
	z-index: 5;
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.72);
	pointer-events: none;
}

.raw-wsc-item-loader::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 22px;
	height: 22px;
	margin: -11px 0 0 -11px;
	border: 2px solid rgba(20, 82, 177, 0.2);
	border-top-color: #1452b1;
	border-radius: 50%;
	animation: raw-wsc-spin 0.55s linear infinite;
}

.xoo-wsc-product.raw-wsc-item-busy .raw-wsc-item-loader {
	display: block;
}

.xoo-wsc-product.raw-wsc-item-busy {
	pointer-events: none;
}

/* Suppress plugin full-modal spinner while a row is updating */
.xoo-wsc-modal.raw-wsc-item-updating.xoo-wsc-loading > .xoo-wsc-loader,
.xoo-wsc-modal.raw-wsc-item-updating.xoo-wsc-loading .xoo-wsc-loader,
.xoo-wsc-modal.raw-wsc-item-updating.xoo-wsc-loading .xoo-wsc-loader-icon,
.xoo-wsc-modal.xoo-wsc-loading:has(.raw-wsc-item-busy) .xoo-wsc-loader,
.xoo-wsc-modal.xoo-wsc-loading:has(.raw-wsc-item-busy) .xoo-wsc-loader-icon {
	display: none !important;
	opacity: 0 !important;
	visibility: hidden !important;
}

@keyframes raw-wsc-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ── Snappy open / close ─────────────────────────────── */
.xoo-wsc-container,
.xoo-wsc-slider {
	transition: right 0.12s cubic-bezier(0.22, 1, 0.36, 1), left 0.12s cubic-bezier(0.22, 1, 0.36, 1) !important;
}

.xoo-wsc-opac {
	transition: opacity 0.1s ease, visibility 0.1s ease !important;
}

.xoo-wsc-modal {
	transition: visibility 0s linear 0s !important;
}

.xoo-wsc-modal:not(.xoo-wsc-cart-active) {
	transition: visibility 0s linear 0.12s !important;
}

/* Add-to-cart toast */
.raw-wsc-toast {
	position: fixed;
	left: 50%;
	bottom: 28px;
	transform: translateX(-50%) translateY(12px);
	z-index: 100000;
	max-width: min(92vw, 360px);
	padding: 12px 18px;
	border-radius: 999px;
	background: #050e17;
	color: #fff;
	font-size: 13px;
	font-weight: 600;
	letter-spacing: 0.02em;
	box-shadow: 0 12px 32px rgba(5, 14, 23, 0.35);
	opacity: 0;
	pointer-events: none;
	transition: opacity 0.18s ease, transform 0.18s ease;
}

.raw-wsc-toast.is-visible {
	opacity: 1;
	transform: translateX(-50%) translateY(0);
}

.raw-wsc-toast.is-error {
	background: #b42318;
}

.raw-wsc-removing {
	opacity: 0.35 !important;
	pointer-events: none;
	transition: opacity 0.2s ease;
}

/* ── Mobile: fuller sheet + stacked footer buttons ───── */
@media (max-width: 600px) {
	.xoo-wsc-modal .xoo-wsc-container {
		width: 100% !important;
		max-width: 100% !important;
		border-left: 0 !important;
		border-top: 1px solid rgba(20, 82, 177, 0.2) !important;
		border-radius: 18px 18px 0 0 !important;
		box-shadow: 0 -16px 40px rgba(5, 14, 23, 0.28) !important;
	}

	.xoo-wsc-header {
		border-radius: 18px 18px 0 0;
	}

	.xoo-wsc-ft-buttons-cont {
		grid-template-columns: 1fr !important;
	}

	.xoo-wsc-ft-buttons-cont a.xoo-wsc-ft-btn-checkout,
	.xoo-wsc-ft-buttons-cont a.xoo-wsc-ft-btn-cart,
	.xoo-wsc-ft-buttons-cont a.xoo-wsc-ft-btn-continue {
		grid-column: 1 / -1 !important;
		font-size: 12px !important;
		padding: 12px 16px !important;
		white-space: nowrap !important;
	}
}

/* -- Dark mode ------------------------------------------- */
html.dark .xoo-wsc-modal .xoo-wsc-container,
html.dark .xoo-wsc-body,
html.dark .xoo-wsc-header {
	background: #0a1624 !important;
	color: #ffffff !important;
	border-color: rgba(255, 255, 255, 0.1) !important;
}

html.dark .xoo-wsc-product-name a,
html.dark .xoo-wsc-products:not(.xoo-wsc-pattern-card) a,
html.dark .xoo-wsc-pname,
html.dark .xoo-wsc-sm-left,
html.dark .xoo-wsc-sm-right,
html.dark .xoo-wsc-ft-totals,
html.dark .xoo-wsc-ft-amt-label,
html.dark .xoo-wsc-ft-amt-value,
html.dark .xoo-wsc-footer-txt,
html.dark .xoo-wsc-emp-txt {
	color: #ffffff !important;
}

html.dark .xoo-wsc-footer {
	background: #0c1826 !important;
	border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
	box-shadow: none;
}

html.dark .xoo-wsc-qty-box,
html.dark .xoo-wsc-qty,
html.dark .raw-wsc-qty {
	background: #122033 !important;
	border-color: rgba(255, 255, 255, 0.16) !important;
}

html.dark .xoo-wsc-qty-box input,
html.dark .xoo-wsc-qty input {
	color: #ffffff !important;
	background: transparent !important;
}

html.dark .xoo-wsc-img-col img {
	background: #122033;
	border-color: rgba(255, 255, 255, 0.12);
}

html.dark .xoo-wsc-product {
	border-color: rgba(255, 255, 255, 0.08) !important;
	background: #122033 !important;
}

html.dark .xoo-wsc-products:not(.xoo-wsc-pattern-card) .xoo-wsc-product {
	background: #122033 !important;
	border-color: rgba(255, 255, 255, 0.12) !important;
	box-shadow: none;
}

html.dark .xoo-wsc-pprice,
html.dark .xoo-wsc-smr-ptotal,
html.dark .xoo-wsc-priceBox,
html.dark .xoo-wsc-product .amount,
html.dark .xoo-wsc-product .woocommerce-Price-amount {
	color: #ffffff !important;
}
