.gfc-box {
	position: fixed;
	background: var(--gfc-bg, #fff);
	color: var(--gfc-color, #222);
	border-radius: var(--gfc-radius, 8px);
	z-index: var(--gfc-z, 999999);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
	padding: 16px 20px;
	display: none;
	font-size: 14px;
	line-height: 1.6;
	box-sizing: border-box;
}

.gfc-box.gfc-visible { display: block; }

/* ===== شكل: نافذة منبثقة (دايمًا في المنتصف) ===== */
.gfc-style-popup {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	max-width: 90vw;
	max-height: 90vh;
	overflow: auto;
}

/* ===== شكل: شريط كامل العرض ===== */
.gfc-style-bar.gfc-pos-top {
	top: 0;
	left: 0;
	right: 0;
	width: 100% !important;
	border-radius: 0;
	text-align: center;
}
.gfc-style-bar.gfc-pos-bottom {
	bottom: 0;
	left: 0;
	right: 0;
	width: 100% !important;
	border-radius: 0;
	text-align: center;
}

/* ===== شكل: صندوق عائم - 6 مواضع ===== */
.gfc-style-box.gfc-pos-top_left {
	top: 20px;
	left: 20px;
}
.gfc-style-box.gfc-pos-top_right {
	top: 20px;
	right: 20px;
}
.gfc-style-box.gfc-pos-bottom_left {
	bottom: 20px;
	left: 20px;
}
.gfc-style-box.gfc-pos-bottom_right {
	bottom: 20px;
	right: 20px;
}
.gfc-style-box.gfc-pos-top_center {
	top: 20px;
	left: 50%;
	transform: translateX(-50%);
}
.gfc-style-box.gfc-pos-bottom_center {
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
}

.gfc-close-btn {
	position: absolute;
	top: -11px;
	right: -11px;
	width: 26px;
	height: 26px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: #fff;
	border: 1px solid #ccc;
	border-radius: 50%;
	box-shadow: 0 2px 5px rgba(0, 0, 0, 0.25);
	cursor: pointer;
	padding: 0;
	z-index: 2;
}
.gfc-close-btn::before {
	content: "\2715";
	color: #000;
	font-size: 14px;
	font-weight: bold;
	line-height: 1;
}
.gfc-close-btn:hover { background: #f5f5f5; }

.gfc-style-bar .gfc-close-btn,
.gfc-style-popup .gfc-close-btn {
	top: -11px;
	right: -11px;
}

.gfc-content { padding-right: 10px; overflow-wrap: break-word; }

/* ===== حركات الظهور ===== */
.gfc-animate.gfc-style-box,
.gfc-animate.gfc-style-popup {
	animation: gfc-fade-up 0.35s ease-out;
}
.gfc-animate.gfc-style-bar.gfc-pos-top {
	animation: gfc-slide-down 0.35s ease-out;
}
.gfc-animate.gfc-style-bar.gfc-pos-bottom {
	animation: gfc-slide-up 0.35s ease-out;
}

@keyframes gfc-fade-up {
	from { opacity: 0; transform: translateY(20px); }
	to   { opacity: 1; transform: translateY(0); }
}
/* حفاظ على المنتصف الأفقي في المواضع الوسطى بعد الأنيميشن */
.gfc-animate.gfc-style-popup { animation-name: gfc-fade-up-center; }
@keyframes gfc-fade-up-center {
	from { opacity: 0; transform: translate(-50%, calc(-50% + 20px)); }
	to   { opacity: 1; transform: translate(-50%, -50%); }
}
.gfc-animate.gfc-pos-top_center,
.gfc-animate.gfc-pos-bottom_center {
	animation-name: gfc-fade-up-hcenter;
}
@keyframes gfc-fade-up-hcenter {
	from { opacity: 0; transform: translate(-50%, 20px); }
	to   { opacity: 1; transform: translate(-50%, 0); }
}
@keyframes gfc-slide-down {
	from { transform: translateY(-100%); }
	to   { transform: translateY(0); }
}
@keyframes gfc-slide-up {
	from { transform: translateY(100%); }
	to   { transform: translateY(0); }
}

/* طبقة خلفية عند فتح أي بوب أب */
body.gfc-popup-open::after {
	content: "";
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 999998;
}

@media (max-width: 600px) {
	.gfc-box { max-width: 92vw !important; }
}
