body.webisoft-cart-popup-open {
	overflow: hidden;
}

#webisoft-cart-popup-backdrop {
	position: fixed;
	inset: 0;
	background-color: rgba(0, 0, 0, 0.5);
	-webkit-backdrop-filter: blur(1px);
	backdrop-filter: blur(1px);
	z-index: 100000;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.3s ease, visibility 0s linear 0.3s;
}

#webisoft-cart-popup-backdrop.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transition-delay: 0s;
}

#webisoft-cart-popup {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 100001;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-height: calc(100dvh - 20px);
	overflow-x: hidden;
	overflow-y: auto;
	direction: rtl;
	box-sizing: border-box;
	color: #333;
	background-color: #fff;
	border-radius: 12px 12px 0 0;
	box-shadow: 0 -2px 15px rgba(0, 0, 0, 0.15);
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transform: translate3d(0, 100%, 0);
	transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1), visibility 0s linear 0.4s;
}

#webisoft-cart-popup.is-visible {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	transform: translate3d(0, 0, 0);
	transition-delay: 0s;
}

#webisoft-cart-popup .webisoft-cart-popup-top-bar {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 56px;
	padding: 12px 55px 12px 15px;
	box-sizing: border-box;
}

#webisoft-cart-popup #webisoft-cart-popup-close {
	position: absolute;
	top: 50%;
	left: 15px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	transform: translateY(-50%);
	background: transparent;
	border: 0;
	border-radius: 6px;
	color: #555;
	font-size: 28px;
	line-height: 1;
	cursor: pointer;
	transition: color 0.2s ease, background-color 0.2s ease;
}

#webisoft-cart-popup #webisoft-cart-popup-close:hover,
#webisoft-cart-popup #webisoft-cart-popup-close:focus-visible {
	color: #000;
	background-color: #f2f2f2;
	outline: none;
}

#webisoft-cart-popup .webisoft-cart-popup-heading {
	flex-grow: 1;
	margin: 0;
	color: #333;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.5;
	text-align: right;
}

#webisoft-cart-popup .webisoft-cart-popup-body {
	display: flex;
	flex-direction: column;
	gap: 15px;
	padding: 15px 15px max(15px, env(safe-area-inset-bottom));
	box-sizing: border-box;
}

#webisoft-cart-popup .webisoft-cart-popup-product {
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 15px;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	background-color: #fff;
}

#webisoft-cart-popup .webisoft-cart-popup-image-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 65px;
	width: 65px;
	height: 65px;
	overflow: hidden;
	border-radius: 6px;
	background-color: #f7f7f7;
}

#webisoft-cart-popup #webisoft-cart-popup-image {
	display: block;
	width: 65px;
	height: 65px;
	object-fit: cover;
	border-radius: 6px;
}

#webisoft-cart-popup .webisoft-cart-popup-details {
	flex: 1 1 auto;
	min-width: 0;
	text-align: right;
}

#webisoft-cart-popup #webisoft-cart-popup-product-name {
	margin: 0;
	overflow-wrap: anywhere;
	color: #2c3e50;
	font-size: 1em;
	font-weight: 700;
	line-height: 1.7;
}

#webisoft-cart-popup .webisoft-cart-popup-divider {
	width: 100%;
	height: 1px;
	background-color: #e9ecef;
}

#webisoft-cart-popup .webisoft-cart-popup-view-cart {
	display: block;
	width: 100%;
	padding: 14px 20px;
	box-sizing: border-box;
	color: #fff;
	background: var(--webisoft-primary, #1d64bd) !important;
	border: 0;
	border-radius: 8px;
	font-size: 1.05em;
	font-weight: 600;
	line-height: 1.5;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.3s ease, transform 0.2s ease;
}

#webisoft-cart-popup .webisoft-cart-popup-view-cart:hover,
#webisoft-cart-popup .webisoft-cart-popup-view-cart:focus-visible {
	color: #fff;
	background: var(--webisoft-cart-popup-hover, #1d64bd) !important;
	outline: none;
}

#webisoft-cart-popup .webisoft-cart-popup-view-cart:active {
	transform: scale(0.99);
}

/* پاپ‌آپ اعلان بومی Woodmart با پاپ‌آپ Webisoft تداخل دارد و باید غیرفعال شود. */
.wd-popup-notifications,
.wd-added-to-cart-popup {
	display: none !important;
}

@media (min-width: 768px) {
	body.webisoft-cart-popup-open {
		overflow: auto;
	}

	#webisoft-cart-popup {
		top: 50%;
		left: 50%;
		right: auto;
		bottom: auto;
		width: 90%;
		max-width: 420px;
		max-height: calc(100dvh - 40px);
		border-radius: 12px;
		box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
		transform: translate3d(-50%, -50%, 0) scale(0.95);
		transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
	}

	#webisoft-cart-popup.is-visible {
		transform: translate3d(-50%, -50%, 0) scale(1);
	}

	#webisoft-cart-popup .webisoft-cart-popup-body {
		padding: 20px;
	}
}

@media (prefers-reduced-motion: reduce) {
	#webisoft-cart-popup-backdrop,
	#webisoft-cart-popup,
	#webisoft-cart-popup .webisoft-cart-popup-view-cart {
		transition-duration: 0.01ms !important;
	}
}
