/**
 * UpsellWP mini-cart drawer (#uwpmc-cart-sidebar).
 *
 * Fixes mobile “chopped” top: the plugin’s .uwpmc-sidebar is position:fixed
 * without an explicit top, so some mobile browsers use the static position
 * and the My Cart header / close control sit above the visible viewport.
 *
 * Also fixes white-on-white “My Cart” title: WP Custom CSS sets
 * color:#fff on .uwpmc-header while background uses
 * var(--e-global-color-secondary) without !important — if that var fails
 * to resolve, the bar is transparent over the white sidebar. Pin navy +
 * white type with !important, loaded after Custom CSS where possible.
 *
 * IMPORTANT: UpsellWP uses #uwpmc-cart-sidebar as a full-viewport dim
 * backdrop (rgba black). When closed it sets width:auto; when open,
 * width:100%. Never force left/right/full size while closed — that leaves
 * an unclickable dark overlay on every page.
 *
 * Enqueued from functions.php as psm-cart-drawer.
 */

/* Closed by default: do not intercept clicks. Plugin sets width:100% when open. */
#uwpmc-cart-sidebar {
	pointer-events: none;
}

#uwpmc-cart-sidebar[style*="width: 100%"],
#uwpmc-cart-sidebar[style*="width:100%"] {
	pointer-events: auto;
	top: 0 !important;
	bottom: 0 !important;
	left: 0 !important;
	right: 0 !important;
	height: 100% !important;
	height: 100dvh !important;
	max-height: 100dvh !important;
}

.uwpmc-sidebar,
#uwpmc-cart-sidebar .uwpmc-sidebar {
	top: 0 !important;
	bottom: 0 !important;
	height: 100% !important;
	height: 100dvh !important;
	max-height: 100dvh !important;
	display: flex !important;
	flex-direction: column !important;
	justify-content: flex-start !important;
	overflow: hidden !important;
	padding-top: env(safe-area-inset-top, 0px) !important;
	box-sizing: border-box !important;
	pointer-events: auto;
	z-index: 100001;
	/* Do not force transform:none here — leave closed off-canvas position alone.
	   Open state is driven by inline left/right from UpsellWP / our open fix. */
}

#uwpmc-cart-sidebar .uwpmc-header {
	flex: 0 0 auto !important;
	position: relative !important;
	top: auto !important;
	z-index: 2;
	margin: 12px 12px 0 !important;
	/* Hardcoded navy — never rely on Elementor secondary alone for contrast. */
	background-color: #060f2e !important;
	color: #ffffff !important;
	border-radius: 20px 20px 0 0;
}

#uwpmc-cart-sidebar .uwpmc-header > div {
	background-color: #060f2e !important;
	background: #060f2e !important;
	color: #ffffff !important;
	border-radius: 20px 20px 0 0;
	padding: 12px !important;
	border: 1px solid #e8eaed !important;
	border-bottom: 0 !important;
	width: 100% !important;
	box-sizing: border-box !important;
}

#uwpmc-cart-sidebar .uwpmc-header h2,
#uwpmc-cart-sidebar .uwpmc-header .uwpmc-header-title,
#uwpmc-cart-sidebar .uwpmc-header-title,
#uwpmc-cart-sidebar .uwpmc-header h2.uwpmc-header-title {
	color: #ffffff !important;
	-webkit-text-fill-color: #ffffff !important;
	font-size: 18px !important;
	font-weight: 600 !important;
	opacity: 1 !important;
	visibility: visible !important;
	margin: 0 !important;
}

#uwpmc-close-cart {
	pointer-events: auto !important;
	cursor: pointer;
	position: relative;
	z-index: 100002;
	color: #ffffff !important;
	flex-shrink: 0;
	opacity: 1 !important;
	visibility: visible !important;
}

#uwpmc-close-cart svg {
	pointer-events: none;
	display: block;
	fill: currentColor;
	stroke: currentColor;
	color: #ffffff !important;
}

#uwpmc-cart-sidebar .uwpmc-body {
	flex: 1 1 auto !important;
	min-height: 0 !important;
	overflow: hidden !important;
}

#uwpmc-cart-sidebar .uwpmc-footer {
	flex: 0 0 auto !important;
}

@media (max-width: 767px) {
	#uwpmc-cart-sidebar[style*="width: 100%"] .uwpmc-sidebar,
	#uwpmc-cart-sidebar[style*="width:100%"] .uwpmc-sidebar,
	#uwpmc-cart-sidebar[style*="width: 100%"] .uwpmc-sidebar.sidebar-right,
	#uwpmc-cart-sidebar[style*="width:100%"] .uwpmc-sidebar.sidebar-right {
		width: 100% !important;
		max-width: 100% !important;
	}
}

/* Hide Quick View eye on product cards (wishlist + compare remain). */
.pls-quickview-button,
.pls-quickview-btn,
.pls-product-icons .pls-quickview-button {
	display: none !important;
}
