/* Masa Geo-Pricing — Frontend styles */

/* ─── Currency Switcher ─── */
.masa-currency-switcher {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	direction: rtl;
}
.masa-switcher-label {
	font-size: 13px;
	font-weight: 700;
	color: #1f2937;
	white-space: nowrap;
}
.masa-switcher-select {
	min-height: 36px;
	padding: 6px 30px 6px 10px;
	border: 1px solid #cbd5e1;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	background: #fff;
	color: #0f172a;
	transition: border-color .2s ease, box-shadow .2s ease, opacity .2s ease;
}
.masa-switcher-select:hover { border-color: #94a3b8; }
.masa-switcher-select:focus-visible {
	outline: 0;
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, .18);
}
.masa-switcher-select:disabled { cursor: wait; opacity: .65; }
.masa-switcher-select option { font-weight: 500; }
.masa-floating-switcher {
	position: fixed;
	bottom: max(16px, env(safe-area-inset-bottom));
	inset-inline-start: 16px;
	z-index: 9999;
	background: rgba(255, 255, 255, .96);
	backdrop-filter: blur(10px);
	border: 1px solid rgba(203, 213, 225, .9);
	border-radius: 12px;
	padding: 10px 12px;
	box-shadow: 0 12px 28px rgba(15, 23, 42, .16);
}
@media (max-width: 480px) {
	.masa-floating-switcher { inset-inline: 12px; bottom: max(12px, env(safe-area-inset-bottom)); }
	.masa-floating-switcher .masa-currency-switcher { justify-content: space-between; width: 100%; }
	.masa-switcher-select { flex: 1; }
}
@media (prefers-reduced-motion: reduce) {
	.masa-currency-switcher *, .masa-geo-free-shipping-progress-inner { transition: none !important; animation: none !important; }
}

/* ─── شريط معاينة الموظف (الإدارة في بلد غير بلد البيع) ─── */
.masa-geo-staff-preview {
	position: sticky;
	top: 0;
	z-index: 99990;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 10px;
	margin: 0;
	padding: 10px 16px;
	background: #0f172a;
	color: #e2e8f0;
	font-size: 13px;
	line-height: 1.5;
}
body.admin-bar .masa-geo-staff-preview { top: 32px; }
@media (max-width: 782px) {
	body.admin-bar .masa-geo-staff-preview { top: 46px; }
}
.masa-geo-staff-preview strong { color: #fff; font-weight: 700; }
.masa-geo-staff-preview a {
	display: inline-block;
	padding: 2px 10px;
	border-radius: 999px;
	background: #1d4ed8;
	color: #fff;
	text-decoration: none;
	font-weight: 700;
}
.masa-geo-staff-preview a:hover,
.masa-geo-staff-preview a:focus-visible { background: #1e40af; color: #fff; }

/* ─── رسالة "غير متاح في بلدك" (Visibility) ─── */
.masa-geo-unavailable {
	margin: 1rem 0;
	padding: .9rem 1.2rem;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 8px;
	color: #991b1b;
	font-weight: 600;
}

/* ─── شارة "باقي N فقط في منطقتك" ─── */
.masa-geo-low-stock {
	display: inline-block;
	margin: .4rem 0 .8rem;
	padding: .35rem .9rem;
	background: #fff7ed;
	border: 1px solid #fed7aa;
	border-radius: 999px;
	color: #c2410c;
	font-weight: 700;
	font-size: .88rem;
}

/* ─── زرار الواتساب (WhatsApp Inquiry) ─── */
.masa-geo-whatsapp-container {
	margin: 1.8rem 0;
}
.masa-geo-whatsapp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 12px;
	padding: 14px 32px;
	background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
	color: #ffffff !important;
	border: none;
	border-radius: 12px;
	font-weight: 700;
	font-size: 16px;
	text-decoration: none !important;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 4px 15px rgba(18, 140, 126, 0.25);
	cursor: pointer;
	border: 1px solid rgba(255, 255, 255, 0.1);
}
.masa-geo-whatsapp-btn:hover {
	background: linear-gradient(135deg, #20ba5a 0%, #0d7367 100%);
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(18, 140, 126, 0.35);
}
.masa-geo-whatsapp-btn:active {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(18, 140, 126, 0.2);
}
.masa-geo-whatsapp-btn svg {
	width: 22px;
	height: 22px;
	fill: currentColor;
	display: block;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
.masa-geo-whatsapp-btn:hover svg {
	transform: scale(1.1) rotate(8deg);
}
/* زرار الواتساب في الكتالوج/الأرشيف */
.masa-geo-loop-whatsapp-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background-color: #25D366 !important;
	color: #ffffff !important;
	transition: background-color 0.2s ease, transform 0.1s ease !important;
}
.masa-geo-loop-whatsapp-btn:hover {
	background-color: #20ba5a !important;
	color: #ffffff !important;
}

/* ─── شارة العملة المحلية (Currency Badge) ─── */
.masa-geo-currency-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 8px 0;
	padding: 4px 10px;
	border-radius: 6px;
	font-weight: 600;
	direction: rtl;
	transition: all 0.3s ease;
}
.masa-geo-currency-badge--single {
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #166534;
	font-size: 0.9rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
	animation: masaFadeInUp 0.4s ease;
}
.masa-geo-currency-badge--loop {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	color: #475569;
	font-size: 0.75rem;
	padding: 2px 6px;
}
.masa-geo-badge-flag {
	font-size: 1.1em;
	line-height: 1;
}

/* ─── شريط تقدم الشحن المجاني (Free Shipping Progress Bar) ─── */
.masa-geo-free-shipping-bar-wrapper {
	background: linear-gradient(135deg, #f8fafc, #f1f5f9);
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 16px 20px;
	margin: 20px 0;
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
	direction: rtl;
	font-family: inherit;
	animation: masaFadeInUp 0.5s ease;
}
.masa-geo-free-shipping-text {
	font-size: 15px;
	font-weight: 700;
	color: #1e293b;
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	gap: 8px;
}
.masa-geo-free-shipping-progress {
	background-color: #e2e8f0;
	border-radius: 9999px;
	height: 10px;
	overflow: hidden;
	position: relative;
}
.masa-geo-free-shipping-progress-inner {
	background: linear-gradient(90deg, #10b981, #34d399);
	height: 100%;
	border-radius: 9999px;
	transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 0 8px rgba(16, 185, 129, 0.4);
	position: relative;
}
.masa-geo-free-shipping-progress-inner::after {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(
		90deg,
		rgba(255, 255, 255, 0) 0%,
		rgba(255, 255, 255, 0.3) 50%,
		rgba(255, 255, 255, 0) 100%
	);
	animation: masaProgressShine 2s infinite linear;
}

@keyframes masaFadeInUp {
	from {
		opacity: 0;
		transform: translateY(4px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@keyframes masaProgressShine {
	0% {
		transform: translateX(-100%);
	}
	100% {
		transform: translateX(100%);
	}
}

/* ─── v5.0.0: أيقونات SVG + الشريط العلوي + زر CTA ─── */
.masa-icon {
	display: inline-block;
	vertical-align: -0.18em;
	flex-shrink: 0;
}

.masa-geo-site-banner {
	background: #0f172a;
	color: #f8fafc;
	font-size: 14px;
	line-height: 1.5;
	padding: 10px 16px;
	direction: rtl;
	border-bottom: 1px solid rgba(255, 255, 255, 0.12);
	position: relative;
	z-index: 9990;
}
.masa-geo-site-banner__inner {
	max-width: 1200px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}
.masa-geo-site-banner__content {
	display: flex;
	align-items: center;
	gap: 8px;
	flex: 1;
}
.masa-geo-site-banner__content a {
	color: #93c5fd;
	text-decoration: underline;
}
.masa-geo-site-banner__close {
	background: transparent;
	border: 1px solid rgba(255, 255, 255, 0.25);
	color: #f8fafc;
	border-radius: 6px;
	width: 28px;
	height: 28px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	padding: 0;
	flex-shrink: 0;
}
.masa-geo-site-banner__close:hover {
	background: rgba(255, 255, 255, 0.12);
}

.masa-geo-unavailable {
	display: flex;
	flex-direction: column;
	gap: 10px;
	background: #fffbeb;
	border: 1px solid #fcd34d;
	border-radius: 8px;
	padding: 14px 16px;
	margin: 14px 0;
	color: #78350f;
	direction: rtl;
	font-size: 14px;
	line-height: 1.6;
}
.masa-geo-unavailable__msg {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	font-weight: 600;
}
.masa-geo-unavailable-cta {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	align-self: flex-start;
	background: #0f766e;
	color: #ffffff !important;
	text-decoration: none !important;
	font-weight: 600;
	font-size: 13.5px;
	padding: 8px 16px;
	border-radius: 6px;
	transition: background-color 0.2s ease;
}
.masa-geo-unavailable-cta:hover {
	background: #115e59;
	color: #ffffff !important;
}
.masa-geo-loop-unavailable {
	display: inline-flex;
	align-items: center;
	gap: 5px;
	margin-top: 6px;
	padding: 3px 9px;
	border-radius: 999px;
	background: #fef3c7;
	border: 1px solid #fde68a;
	color: #92400e;
	font-size: 12px;
	font-weight: 600;
}


