/* 1. رفع البوب اب والخلفية لأعلى درجة ممكنة فوق الشاشة */
.wcpc-overlay {
	--wcpc-primary: rgb(237,120,18);
	position: fixed !important;
	inset: 0 !important;
	background: rgba(0, 0, 0, 0.75) !important; /* خلفية داكنة تحجب المتجر */
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	z-index: 99999999999 !important; 
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.25s ease;
	padding: 16px;
	box-sizing: border-box;
	pointer-events: auto !important; /* السماح بالنقرات إجبارياً */
}

/* التحويل للظهور */
.wcpc-overlay.wcpc-visible {
	opacity: 1 !important;
	visibility: visible !important;
}

/* 2. تحرير النافذة وعزلها لتستقبل الماوس والكيبورد رغماً عن المتصفح */
.wcpc-modal {
	background: #fff !important;
	max-width: 380px !important;
	width: 100% !important;
	border-radius: 14px !important;
	padding: 28px 24px 24px !important;
	position: relative !important;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
	transform: translateY(0) scale(1) !important; /* إلغاء التداخل مع القالب */
	text-align: center !important;
	font-family: inherit !important;
	direction: rtl !important;
	z-index: 100000000000 !important;
	pointer-events: auto !important;
}

/* نقل زر الإغلاق لليمين */
.wcpc-close {
	position: absolute !important;
	top: 12px !important;
	right: 15px !important;
	left: auto !important;
	background: none !important;
	border: none !important;
	font-size: 24px !important;
	cursor: pointer !important;
	color: #999 !important;
	z-index: 100000000002 !important;
	pointer-events: auto !important;
}
.wcpc-close:hover { color: #333 !important; }

.wcpc-modal h3 {
	margin: 0 0 8px !important;
	font-size: 19px !important;
	color: #222 !important;
}

.wcpc-text {
	font-size: 13.5px !important;
	color: #666 !important;
	margin: 0 0 18px !important;
	line-height: 1.6 !important;
}

/* 3. إجبار الحقل على فك الشمل واستقبال الكتابة والتركيز */
.wcpc-phone-field {
	display: flex !important;
	align-items: center !important;
	border: 1.5px solid #e0e0e0 !important;
	border-radius: 10px !important;
	overflow: hidden !important;
	background: #ffffff !important;
	direction: ltr !important; /* الأرقام من اليسار لليمين */
	position: relative !important;
	pointer-events: auto !important;
}

.wcpc-phone-field:focus-within {
	border-color: var(--wcpc-primary) !important;
}

.wcpc-flag { font-size: 20px !important; padding: 0 8px 0 12px !important; }
.wcpc-code { color: #555 !important; font-size: 14px !important; padding-right: 8px !important; border-right: 1px solid #ddd !important; margin-right: 8px !important; }

/* تحرير حقل الإدخال الأصلي والكتابة الفورية */
#wcpc-phone-input {
	flex: 1 !important;
	border: none !important;
	outline: none !important;
	background: transparent !important;
	padding: 13px 12px !important;
	font-size: 16px !important;
	letter-spacing: 0.5px !important;
	direction: ltr !important;
	text-align: left !important;
	pointer-events: auto !important;
	cursor: text !important;
}

.wcpc-error { color: #c0392b !important; font-size: 12.5px !important; margin-top: 8px !important; text-align: center !important; }

/* زر الحفظ ومتابعة التسوق */
.wcpc-submit-btn {
	margin-top: 16px !important;
	width: 100% !important;
	background: var(--wcpc-primary) !important;
	color: #fff !important;
	border: none !important;
	border-radius: 10px !important;
	padding: 13px 16px !important;
	font-size: 15px !important;
	font-weight: 600 !important;
	cursor: pointer !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	pointer-events: auto !important;
}

/* 4. الضربة القاضية: كسر وحل تعارض كود وودمارت الجديد لتسهيل الكتابة */
/* طالما البوب اب ظاهر، نقوم بتعطيل تفتيح كود السلة وخلفيتها لكي لا تسحب تركيز الماوس */
.wcpc-overlay.wcpc-visible ~ .wd-side-hidden,
.wcpc-overlay.wcpc-visible ~ .cart-widget-side,
body.woodmart-cart-opened .wd-side-hidden.wd-opened {
	z-index: 100 !important; /* إنزال السلة لطبقة سفلية تحت البوب اب */
	pointer-events: none !important; /* منع الماوس من التفاعل مع السلة نهائياً */
}

/* إخفاء غطاء الخلفية الأسود الشفاف الخاص بوودمارت طالما البوب اب شغال */
body.woodmart-cart-opened .wd-close-side-opened,
body.woodmart-cart-opened .wd-close-side {
	opacity: 0 !important;
	visibility: hidden !important;
	pointer-events: none !important;
}