html, body {
    height: 100%;
    margin: 0;
}

body.map-page {
  height: 100%;
}

.map-page .ui-hidden {
  opacity: 0;
  transform: translateY(-10px);
  pointer-events: none;
  transition: all 0.25s ease;
}

.map-page #layout {
    display: flex;
    height: 100vh;
    flex-direction: row-reverse;
}

.map-page #map {
    width: 100%;
    height: 100%;
    position: relative;
    z-index: auto;
}

.map-page .leaflet-container {
  width: 100%;
  height: 100%;
  position: relative;
}

.map-page .leaflet-overlay-pane {
  z-index: 400;
}

.map-page .leaflet-marker-pane {
  z-index: 600;
}

/* تأكد marker كمان فوق */
.map-page .leaflet-popup-pane {
  z-index: 700;
}

.map-page .leaflet-popup-content-wrapper {
    background: #1e1e1e;
    color: #fff;
    border-radius: 10px;
}

.map-page .leaflet-popup-tip {
    background: #1e1e1e;
}

.map-page .leaflet-popup-content {
    margin: 10px;
}

/* divider */
.map-page .divider {
    height: 1px;
    background: rgba(255,255,255,0.15);
    margin: 15px 0;
}


/* الأيقونات 🔥 */
.map-page .filter-item img {
    width: 38px;
    height: 38px;
    object-fit: contain;
    flex-shrink: 0;
}

/* الأيقونة داخل العنصر */
.map-page .filter-item.active img {
    transform: scale(1.1);
}

/* ======================================== */
/* ===== POPUP PROFESSIONAL UI ===== */
/* ======================================== */

.map-page .popup-container {
  font-family: 'Segoe UI', Arial;
  direction: rtl;
  text-align: right;
  min-width: 280px;
  max-width: 320px;
  color: #fff;
  background: linear-gradient(160deg, #0f172a, #1e293b);
  border-radius: 14px;
  padding: 0;
  overflow: hidden;
  box-shadow:
    0 10px 30px rgba(0,0,0,0.8),
    0 0 20px rgba(0,0,0,0.5);
}

/* العنوان */
.map-page .popup-title {
  background: linear-gradient(90deg, #ef4444, #b91c1c);
  padding: 10px 12px;
  font-size: 14px;
  font-weight: bold;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

/* التاريخ */
.map-page .popup-date {
  font-size: 11px;
  color: #94a3b8;
  margin: 8px 12px;
}

/* التصنيف */
.map-page .popup-category {
  margin: 0 12px 10px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 11px;
  font-weight: bold;
  display: inline-block;
}

/* الصورة */
.map-page .popup-image {
  width: 100%;
  max-height: 160px;
  object-fit: cover;
}

/* الوصف */
.map-page .popup-description {
  padding: 0 12px 12px;
  font-size: 13px;
  line-height: 1.6;
}

.map-page .popup-meta {
  margin: 0 12px 12px;
  padding: 6px 10px;
  border-radius: 8px;
  background: rgba(255,255,255,0.05);
  font-size: 12px;
  color: #cbd5f5;
  box-sizing: border-box;
}

/* الأزرار */
.map-page .popup-actions {
  margin-top: 10px;
  display: flex;
  gap: 8px;
}

.map-page .btn-edit {
  flex: 1;
  text-align: center;
  padding: 6px;
  background: #3498db;
  color: #fff;
  border-radius: 8px;
  text-decoration: none;
  font-size: 12px;

  transition: 0.2s;
}

.map-page .btn-edit:hover {
  background: #2980b9;
}

.map-page .btn-delete {
  flex: 1;
  padding: 6px;
  background: #e74c3c;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;

  transition: 0.2s;
}

.map-page .btn-delete:hover {
  background: #c0392b;
}

.map-page .popup-video {
  padding: 0 12px 10px;
  position: relative;
}

.map-page .video-btn {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 10px;
  background: linear-gradient(90deg, #2563eb, #1d4ed8);
  color: #ffffff !important;
  border-radius: 8px;
  text-decoration: none;
  font-size: 13px;
  font-weight: bold;
  text-align: center;
  text-shadow: 0 0 3px rgba(0,0,0,0.6); /* 🔥 وضوح */
  cursor: pointer;
  transition: 0.2s;
  position: relative;
  z-index: 10;
}

.map-page .video-btn:hover {
  transform: scale(1.03);
  filter: brightness(1.1);
}

/* ======================================== */
/* ===== CONFIDENCE ===== */
/* ======================================== */
.map-page .popup-confidence.high {
  background: rgba(34,197,94,0.2);
  color: #22c55e;
}

.map-page .popup-confidence.medium {
  background: rgba(245,158,11,0.2);
  color: #f59e0b;
}

.map-page .popup-confidence.low {
  background: rgba(239,68,68,0.2);
  color: #ef4444;
}

/* ======================================== */
/* ===== POPUP ANIMATION ===== */
/* ======================================== */

.map-page .leaflet-popup-content-wrapper {
  animation: map-popupFade 0.3s ease;
}

@keyframes map-popupFade {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.95);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ======================================== */
/* ===== CLUSTER ANIMATION (Pulse) ===== */
/* ======================================== */

@keyframes map-clusterPulse {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.08);
  }
  100% {
    transform: scale(1);
  }
}

@media (min-width:769px) {
  .map-page .cluster-inner {
    animation: map-clusterPulse 2s infinite;
    will-change: transform;
  }
}

@media (max-width:768px) {
  .map-page .cluster-inner {
    animation: map-clusterPulseMobile 3s infinite;
  }
}

@keyframes map-clusterPulseMobile {
  0% {
    transform: scale(1);
  }
  50% {
    transform: scale(1.04);
  }
  100% {
    transform: scale(1);
  }
}

/* ======================================== */
/* ===== GOV ANIMATION (Pulse) ===== */
/* ======================================== */
.map-page .gov-cluster {
  border-radius: 50%;

  display: flex;
  align-items: center;
  justify-content: center;

  font-weight: bold;
  font-size: 14px;

  color: #111;

  text-shadow:
    0 0 4px rgba(255,255,255,0.9),
    0 0 8px rgba(255,255,255,0.7);

  border: 2px solid rgba(255,255,255,0.6);

  transition: all 0.25s ease;

  will-change: transform, box-shadow;
}

.map-page .gov-cluster {
  animation: map-clusterPulse 2s infinite;
}

@media (max-width:768px) {
  .map-page .gov-cluster {
    animation: map-clusterPulseMobile 3s infinite;
  }
}

@media (hover: hover) {
  .map-page .gov-cluster:hover {
    transform: scale(1.08);

    box-shadow:
      0 0 15px rgba(255,255,255,0.9),
      0 0 30px rgba(0,212,255,0.6),
      0 0 50px rgba(0,212,255,0.4);

    filter: brightness(1.2);
  }
}
/* ======================================== */
/* ===== MARKER PROFESSIONAL STYLE ===== */
/* ======================================== */

.map-page .custom-marker {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,0.1), rgba(0,0,0,0.6));
  box-shadow:
    0 0 10px rgba(255,255,255,0.3),
    0 0 20px rgba(0,0,0,0.6);
  transition: box-shadow 0.25s ease, filter 0.25s ease;
  will-change: transform, box-shadow;
  position: relative;
  overflow: visible;
}

.map-page .custom-marker img {
  width: 85%;
  height: 85%;
  object-fit: contain;
}

/* Hover */
.map-page .leaflet-marker-icon:hover .custom-marker:not(.active) {
  box-shadow:
    0 0 15px rgba(255,255,255,0.8),
    0 0 30px rgba(255,255,255,0.6),
    0 0 50px rgba(255,255,255,0.4);
}

.map-page .custom-marker.high {
  border: 2px solid #22c55e;
}

.map-page .custom-marker.medium {
  border: 2px solid #f59e0b;
}

.map-page .custom-marker.low {
  border: 2px solid #ef4444;
}

/*.map-page .custom-marker.active {
  box-shadow:
    0 0 20px rgba(255,255,255,1),
    0 0 40px rgba(0,212,255,0.9),
    0 0 80px rgba(0,212,255,0.7);
  filter: brightness(1.4);
}*/

.map-page .custom-marker.burst::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: 120%;
  height: 120%;
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(1);
  border: 2px solid rgba(0,212,255,0.9); /* 🔥 هذا الفرق */
  background: transparent; /* ❌ لا لون داخلي */
  animation: map-burst 0.8s ease-out;
  z-index: 2;
  pointer-events: none;
}

/* 🎯 ألوان حسب نوع الحدث */
.map-page .custom-marker.burst-قتل::after {
  border-color: #ef4444;
}
.map-page .custom-marker.burst-اعتقال::after {
  border-color: #3b82f6;
}
.map-page .custom-marker.burst-تهجير::after {
  border-color: #f59e0b;
}
.map-page .custom-marker.burst-انفجار::after {
  border-color: #a855f7;
}
.map-page .custom-marker.burst-اطلاق-نار::after {
  border-color: #f97316;
}
.map-page .custom-marker.burst-قصف::after {
  border-color: #22c55e;
}

@keyframes map-burst {
  0% {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
  }
  100% {
    transform: translate(-50%, -50%) scale(2.2);
    opacity: 0;
  }
}

/* ======================================== */
/* ===== MAP LOADER ===== */
/* ======================================== */

.map-page #map-container {
  position: relative;
  flex: 1;
  height: 100%;
  overflow: hidden;
}

.map-page #map-loader {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.3);
  backdrop-filter: blur(3px);
  z-index: 9999;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.map-page #map-loader.active {
  opacity: 1;
  pointer-events: all;
}

.map-page .loader-spinner {
  width: 50px;
  height: 50px;
  border: 4px solid rgba(255,255,255,0.2);
  border-top: 4px solid #00d4ff;
  border-radius: 50%;
  animation: map-spin 1s linear infinite;
}

@keyframes map-spin {
  to {
    transform: rotate(360deg);
  }
}

/* ======================================== */
/* ===== EMPTY STATE ===== */
/* ======================================== */

.map-page #map-empty {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  padding: 10px 18px;
  border-radius: 10px;
  color: #fff;
  font-size: 13px;
  text-align: center;
  max-width: 280px;
  width: auto;
  white-space: normal;
  line-height: 1.5;
  z-index: 600;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.map-page #map-empty.active {
  opacity: 1;
}

/* ======================================== */
/* ===== MAP FADE IN EFFECT ===== */
/* ======================================== */



/* ======================================== */
/* ===== MAP LEGEND ===== */
/* ======================================== */

.map-page #map-legend {
  position: absolute;
  bottom: 20px;
  right: 20px;
  left: auto;
  background: rgba(0,0,0,0.75);
  backdrop-filter: blur(6px);
  padding: 12px;
  border-radius: 12px;
  color: #fff;
  font-size: 12px;
  z-index: 400;
  min-width: 180px;
  pointer-events: auto;
  transition: all 0.25s ease;
}

.map-page .legend-title {
  font-weight: bold;
  margin-bottom: 8px;
}

/* 🔥 الشريط */
.map-page .legend-gradient {
  height: 10px;
  border-radius: 6px;
  margin-bottom: 6px;
  background: linear-gradient(
    to right,
    #22c55e,
    #facc15,
    #f97316,
    #ef4444
  );
}

.map-page .legend-section {
  margin-top: 10px;
}

.map-page .legend-subtitle {
  font-size: 11px;
  color: #94a3b8;
  margin-bottom: 5px;
  font-weight: 600;
}

.map-page .legend-divider {
  height: 1px;
  background: rgba(255,255,255,0.1);
  margin: 8px 0;
}

/* 🔥 الأرقام */
.map-page .legend-labels {
  display: flex;
  justify-content: space-between;
  font-size: 11px;
  opacity: 0.9;
}

/* وصف الكثافة */
.map-page .legend-desc {
  margin-top: 6px;
  font-size: 11px;
  color: #cbd5f5;
  opacity: 0.85;
  line-height: 1.4;
}

/* الموثوقية */
.map-page .legend-confidence {
  margin-top: 8px;
  display: flex;
  justify-content: space-between;
  gap: 6px;
  font-size: 11px;
}

/* عناصر الموثوقية */
.map-page .legend-confidence .conf {
  background: rgba(255,255,255,0.05);
  padding: 3px 6px;
  border-radius: 6px;
  white-space: nowrap;
}

/* ألوان */
.map-page .legend-confidence .high {
  color: #22c55e;
}

.map-page .legend-confidence .medium {
  color: #f59e0b;
}

.map-page .legend-confidence .low {
  color: #ef4444;
}

@media (max-width: 768px) {

  .map-page #map-legend {
    padding: 6px;
    min-width: 130px;
    max-width: 160px;
    font-size: 10px;
    border-radius: 10px;
  }

  .map-page .legend-gradient {
    height: 6px;
  }

  .map-page .legend-labels {
    font-size: 9px;
  }

  .map-page .legend-desc {
    display: none; /* 🔥 نحذفه على الموبايل */
  }

  .map-page .legend-confidence {
    gap: 3px;
  }

  .map-page .legend-confidence .conf {
    padding: 2px 4px;
    font-size: 9px;
  }

  .map-page .legend-divider {
    margin: 5px 0;
  }

}

/* ======================================== */
/* ===== SIDEBAR FIXED ===== */
/* ======================================== */

/* 📱 موبايل فقط */
@media (max-width: 768px) {

  .map-page #layout {
    flex-direction: column;
  }

  .map-page #map-container {
    height: 100dvh;
  }

  .map-page #control-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 78%;
    max-width: 280px;
    height: 100vh;
    background: linear-gradient(180deg, #0f172a, #020617);
    transform: translateX(100%);
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 99999;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 10px;
  }

  .map-page #control-panel.open {
    transform: translateX(0);
    pointer-events: auto;
  }

  .map-page #menu-toggle {
    display: block;
  }

  .map-page .custom-marker {
    box-shadow:
      0 0 6px rgba(255,255,255,0.2),
      0 0 10px rgba(0,0,0,0.4);
  }

  .map-page .filter-item,
  .map-page .toggle-item {
    padding: 10px 12px;
  }

  .map-page #close-menu {
    display: block !important;
    position: sticky;
    top: 10px;
    align-self: flex-start;
    background: rgba(0,0,0,0.6);
    border: none;
    color: #fff;
    font-size: 18px;
    border-radius: 8px;
    padding: 6px 10px;
    cursor: pointer;
    z-index: 20;
  }

}

/* 🖱️ hover فقط للكمبيوتر */
@media (hover: hover) {
  .map-page .leaflet-marker-icon:hover .custom-marker {   
    box-shadow:
      0 0 15px rgba(255,255,255,0.9),
      0 0 25px rgba(0,212,255,0.6),
      0 0 40px rgba(0,212,255,0.4);
    filter: brightness(1.2);
    transform: none;
  }
}

/* يظهر فقط على الموبايل */
.map-page #menu-toggle {
  position: fixed;
  top: 70px;
  right: 15px;
  z-index: 500;
  background: rgba(0,0,0,0.7);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 18px;
  cursor: pointer;
  display: none;
}

@media (max-width: 768px) {
  .map-page #menu-toggle {
    display: block;
  }
}

/* ======================================== */
/* ===== SIDEBAR PROFESSIONAL DESIGN ===== */
/* ======================================== */

.map-page #control-panel {
  width: 320px;
  height: 100vh;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(18px);
  border-left: 1px solid rgba(255,255,255,0.08);
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: stretch;
  color: #fff;
  overflow-y: auto;
  box-shadow: none;
  transition: transform 0.3s ease;
}

.map-page #control-panel.open {
  box-shadow:
    -10px 0 40px rgba(0,0,0,0.7),
    0 0 20px rgba(0,150,255,0.1);
}

/* العناوين */
.map-page .panel-title,
.map-page .legend-title {
  font-size: 14px;
  font-weight: bold;
  letter-spacing: 1px;
  color: #94a3b8;
  text-transform: uppercase;
}

/* الفلاتر */
.map-page .filter-item {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
  transition: all 0.25s ease;
}

/* active */
.map-page .filter-item.active {
  background: linear-gradient(90deg, rgba(0,150,255,0.3), rgba(0,150,255,0.1));
  border-color: #00d4ff;
}

/* toggle */
.map-page .toggle-item {
  background: rgba(255,255,255,0.06);
  backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,0.05);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  transition: 0.2s;
}

.map-page .toggle-item.active {
  background: rgba(0,150,255,0.25);
  border-color: #00d4ff;
}

/* select */
/* ===== SELECT FIX ===== */

.map-page .filter-select {
  width: 100%;
  padding: 12px;
  background: linear-gradient(145deg, #0f172a, #1e293b);
  color: #f1f5f9;
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 12px;
  outline: none;
  appearance: none; /* 🔥 مهم */
}

/* عند الفتح */
.map-page .filter-select:focus {
  border-color: #00d4ff;
  box-shadow: 0 0 10px rgba(0,212,255,0.3);
}

/* خيارات القائمة */
.map-page .filter-select option {
  background: #0f172a;
  color: #fff;
}

/* ======================================== */
/* ===== ACTIVE INDICATOR ===== */
/* ======================================== */

.map-page .filter-item,
.map-page .toggle-item {
  position: relative;
  overflow: hidden;
}

/* الخط الجانبي */
.map-page .filter-item.active::before,
.map-page .toggle-item.active::before {
  content: "";
  position: absolute;
  right: 0;
  top: 0;
  width: 4px;
  height: 100%;
  background: linear-gradient(
    to bottom,
    #00d4ff,
    #3b82f6
  );
  box-shadow:
    0 0 10px #00d4ff,
    0 0 20px #00d4ff;
    animation: map-pulseLine 1.5s infinite;
}

@keyframes map-pulseLine {
  0% { opacity: 0.6; }
  50% { opacity: 1; }
  100% { opacity: 0.6; }
}

/* ======================================== */
/* ===== TYPOGRAPHY SYSTEM ===== */
/* ======================================== */

/* عنوان القسم */
.map-page .panel-title {
  font-size: 18px;
  font-weight: 700;
  color: #e2e8f0;
}

/* عنوان فرعي */
.map-page .legend-title {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
}

/* عناصر القائمة */
.map-page .filter-item,
.map-page .toggle-item {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 12px;
  box-sizing: border-box;
  min-height: 44px;
  font-size: 14px;
  line-height: 1.2;
}

/* النص الصغير */
.map-page #results-info {
  margin-top: 10px;
  font-size: 13px; /* 👈 كان 12 */
  color: #cbd5f5;
  line-height: 1.6;
  opacity: 0.9;
  background: rgba(255,255,255,0.03);
  padding: 10px;
  border-radius: 10px;
}

.map-page .section {
  width: 100%;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

/*تحديد الفترة */
.map-page .date-range-box {
  display: none;
  flex-direction: column;
  gap: 8px;
  opacity: 0;
  transform: translateY(-8px);
  transition: all 0.25s ease;
}

.map-page .date-range-box input {
  width: 100%;
  box-sizing: border-box;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(145deg, #0f172a, #1e293b);
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 500;
  outline: none;
  transition: all 0.25s ease;
}

.map-page .date-range-box input:focus {
  border-color: #00d4ff;
  box-shadow:
    0 0 10px rgba(0,212,255,0.5),
    0 0 20px rgba(0,212,255,0.2);
  transform: scale(1.02);
}

.map-page .date-range-box input::-webkit-calendar-picker-indicator {
  filter: invert(1);
  opacity: 0.7;
  cursor: pointer;
}

.map-page .date-range-box.active {
  display: flex;
  opacity: 1;
  transform: translateY(0);
  background: rgba(0, 150, 255, 0.08);
  border: 1px solid rgba(0, 212, 255, 0.4);
  border-radius: 12px;
  padding: 10px;
  box-shadow:
    0 0 10px rgba(0,212,255,0.2);
}

.map-page .date-error {
  color: #ef4444;
  font-size: 12px;
  margin-top: 5px;
  display: none;
}

.map-page .date-range-box label {
  font-size: 12px;
  color: #94a3b8;
  margin-top: 4px;
}

.map-page #close-menu {
  display: none;
}

/* مربع البحث */
.map-page #map-search {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 500;
  width: calc(100% - 30px);
  max-width: 400px;
}

.map-page #search-input {
  box-sizing: border-box;
  width: 100%;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(10px);
  color: #fff;
  outline: none;
  font-size: 14px;
  box-shadow:
    0 0 10px rgba(0,0,0,0.4);
  transition: all 0.25s ease;
}

.map-page #search-input:focus {
  border-color: #00d4ff;
  box-shadow:
    0 0 10px rgba(0,212,255,0.5),
    0 0 20px rgba(0,212,255,0.3);
}

.map-page #search-input::placeholder {
  color: rgba(255,255,255,0.5);
}

.map-page #search-results {
  position: absolute;
  top: 55px;
  left: 0;
  width: 100%;
  max-height: 260px;
  overflow-y: auto;
  background: rgba(15, 23, 42, 0.9);
  backdrop-filter: blur(10px);
  border-radius: 14px;
  box-shadow:
    0 10px 30px rgba(0,0,0,0.6);
  display: none;
  animation: map-fadeInSearch 0.2s ease;
}

@keyframes map-fadeInSearch {
  from {
    opacity: 0;
    transform: translateY(-5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.map-page .search-item {
  padding: 12px 14px;
  cursor: pointer;
  font-size: 14px;
  color: #e2e8f0;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-page .search-item:hover {
  background: rgba(0,150,255,0.2);
  transform: translateX(-3px);
  box-shadow:
    inset 3px 0 0 #00d4ff;
}

.map-page .search-item:last-child {
  border-bottom: none;
}

/* ========================================
   ===== SIDEBAR OVERLAY =====
======================================== */

.map-page #sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.5);
  backdrop-filter: blur(4px);
  z-index: 99997;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.map-page #sidebar-overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* ========================================
   ===== HOVER GLOW EFFECT =====
======================================== */

.map-page .filter-item,
.map-page .toggle-item {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

/* 🖱️ للكمبيوتر */
@media (hover: hover) {

  .map-page .filter-item:hover,
  .map-page .toggle-item:hover {
    transform: translateY(-2px);
    box-shadow:
      0 0 10px rgba(0,212,255,0.3),
      0 0 20px rgba(0,212,255,0.2);
    border-color: rgba(0,212,255,0.5);
  }

}

/* 📱 للموبايل (عند الضغط) */
.map-page .filter-item:active,
.map-page .toggle-item:active {
  transform: scale(0.97);
  box-shadow:
    0 0 10px rgba(0,212,255,0.4),
    0 0 20px rgba(0,212,255,0.3);
}

/* ========================================
   ===== FIX ZOOM POSITION (MOBILE)
======================================== */

@media (max-width: 768px) {

  .map-page .leaflet-top.leaflet-left {
    top: 80px; /* 🔥 نزّل الزوم تحت البحث */
  }

}

/* ========================================
   ===== SEARCH HIGHLIGHT =====
======================================== */

.map-page .highlight {
  color: #00d4ff;
  font-weight: bold;
  text-shadow:
    0 0 5px rgba(0,212,255,0.7),
    0 0 10px rgba(0,212,255,0.5);
}

/* ========================================
   ===== SEARCH ICON STYLE =====
======================================== */

.map-page .search-item {
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-page .search-icon {
  font-size: 18px;
  width: 24px;
  text-align: center;
}

.map-page .search-text {
  flex: 1;
}

/* المشاركة */
.map-page .btn-share {
  flex: 1;
  padding: 6px;
  background: #22c55e;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 12px;
  cursor: pointer;
  transition: 0.2s;
}

.map-page .btn-share:hover {
  background: #16a34a;
}