/* ── Geo gate — شاشة حظر المنطقة ── */
html.bahr-geo-blocked body > :not(#bahr-geo-gate):not(script):not(style):not(link) {
  visibility: hidden !important;
  pointer-events: none !important;
}

html.bahr-geo-checking #root,
html.bahr-geo-checking body > main,
html.bahr-geo-checking body > header,
html.bahr-geo-checking body > section,
html.bahr-geo-checking body > footer,
html.bahr-geo-checking body > aside,
html.bahr-geo-checking body > .site-bg,
html.bahr-geo-checking body > .scroll-progress {
  opacity: 0;
  pointer-events: none;
}

#bahr-geo-gate {
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(12px, 4vw, 32px);
  font-family: 'Tajawal', 'Segoe UI', Tahoma, sans-serif;
  direction: rtl;
  overflow: hidden;
}

#bahr-geo-gate.is-hidden {
  display: none;
}

.bahr-geo-ocean {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 80% at 50% 120%, rgba(14, 116, 144, 0.45) 0%, transparent 55%),
    radial-gradient(ellipse 80% 50% at 20% 0%, rgba(56, 189, 248, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 60% 40% at 85% 15%, rgba(245, 215, 142, 0.08) 0%, transparent 45%),
    linear-gradient(165deg, #020617 0%, #0a1628 35%, #0c4a6e 70%, #082f49 100%);
}

.bahr-geo-stars {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(1px 1px at 10% 20%, rgba(255, 255, 255, 0.7), transparent),
    radial-gradient(1px 1px at 30% 65%, rgba(255, 255, 255, 0.5), transparent),
    radial-gradient(1.5px 1.5px at 55% 15%, rgba(245, 215, 142, 0.8), transparent),
    radial-gradient(1px 1px at 72% 42%, rgba(255, 255, 255, 0.6), transparent),
    radial-gradient(1px 1px at 88% 78%, rgba(255, 255, 255, 0.45), transparent),
    radial-gradient(1.5px 1.5px at 45% 88%, rgba(103, 232, 249, 0.7), transparent);
  animation: bahr-geo-twinkle 6s ease-in-out infinite alternate;
  opacity: 0.85;
}

.bahr-geo-fog {
  position: absolute;
  inset: -20%;
  background: radial-gradient(circle at 50% 50%, rgba(148, 163, 184, 0.08) 0%, transparent 55%);
  animation: bahr-geo-fog 18s ease-in-out infinite alternate;
  pointer-events: none;
}

.bahr-geo-waves {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 38%;
  opacity: 0.55;
  pointer-events: none;
}

.bahr-geo-waves svg {
  width: 200%;
  height: 100%;
  animation: bahr-geo-wave 12s linear infinite;
}

.bahr-geo-card {
  position: relative;
  z-index: 2;
  width: min(520px, 100%);
  padding: clamp(1.5rem, 5vw, 2.25rem);
  border-radius: 24px;
  text-align: center;
  color: #e2e8f0;
  background: linear-gradient(145deg, rgba(15, 23, 42, 0.92) 0%, rgba(12, 74, 110, 0.55) 100%);
  border: 1px solid rgba(245, 215, 142, 0.35);
  box-shadow:
    0 0 0 1px rgba(56, 189, 248, 0.12),
    0 24px 80px rgba(2, 8, 23, 0.65),
    0 0 60px rgba(245, 215, 142, 0.08);
  backdrop-filter: blur(16px);
  animation: bahr-geo-card-in 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.bahr-geo-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  padding: 1px;
  background: linear-gradient(135deg, rgba(245, 215, 142, 0.5), transparent 40%, rgba(56, 189, 248, 0.35));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.bahr-geo-compass {
  width: 88px;
  height: 88px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  font-size: 2.75rem;
  filter: drop-shadow(0 0 18px rgba(245, 215, 142, 0.45));
  animation: bahr-geo-compass 8s ease-in-out infinite;
}

.bahr-geo-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.85rem;
  margin-bottom: 0.85rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #fef9c3;
  background: rgba(245, 215, 142, 0.12);
  border: 1px solid rgba(245, 215, 142, 0.28);
}

.bahr-geo-title {
  margin: 0 0 0.75rem;
  font-size: clamp(1.35rem, 4.5vw, 1.85rem);
  font-weight: 800;
  line-height: 1.35;
  color: #fef9c3;
  text-shadow: 0 2px 24px rgba(245, 215, 142, 0.25);
}

.bahr-geo-message {
  margin: 0 0 1.25rem;
  font-size: clamp(0.95rem, 2.8vw, 1.05rem);
  line-height: 1.75;
  color: rgba(226, 232, 240, 0.92);
  white-space: pre-line;
}

.bahr-geo-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
  margin-bottom: 1rem;
}

.bahr-geo-chip {
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.78rem;
  color: #bae6fd;
  background: rgba(14, 116, 144, 0.25);
  border: 1px solid rgba(56, 189, 248, 0.2);
}

.bahr-geo-progress {
  height: 4px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(148, 163, 184, 0.15);
  margin-bottom: 0.85rem;
}

.bahr-geo-progress span {
  display: block;
  height: 100%;
  width: 35%;
  border-radius: inherit;
  background: linear-gradient(90deg, #0891b2, #f5d78e, #0891b2);
  background-size: 200% 100%;
  animation: bahr-geo-progress 2.4s ease-in-out infinite;
}

.bahr-geo-foot {
  margin: 0;
  font-size: 0.8rem;
  color: rgba(148, 163, 184, 0.85);
}

.bahr-geo-foot strong {
  color: #fde68a;
  font-weight: 700;
}

.bahr-geo-loading {
  position: relative;
  z-index: 2;
  color: #bae6fd;
  font-size: 0.95rem;
  text-align: center;
}

@keyframes bahr-geo-twinkle {
  from { opacity: 0.55; transform: scale(1); }
  to { opacity: 1; transform: scale(1.02); }
}

@keyframes bahr-geo-fog {
  from { transform: translate(-3%, -2%) scale(1); }
  to { transform: translate(3%, 2%) scale(1.05); }
}

@keyframes bahr-geo-wave {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes bahr-geo-compass {
  0%, 100% { transform: rotate(-8deg) scale(1); }
  50% { transform: rotate(8deg) scale(1.04); }
}

@keyframes bahr-geo-card-in {
  from { opacity: 0; transform: translateY(24px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes bahr-geo-progress {
  0% { transform: translateX(-100%); background-position: 0% 50%; }
  100% { transform: translateX(320%); background-position: 100% 50%; }
}

@media (prefers-reduced-motion: reduce) {
  .bahr-geo-stars,
  .bahr-geo-fog,
  .bahr-geo-waves svg,
  .bahr-geo-compass,
  .bahr-geo-progress span {
    animation: none !important;
  }
}
