/* زر الخريطة */
.pulse-map-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 9999;
    background: #667eea;
    color: #fff;
    padding: 10px 18px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: "Cairo", sans-serif;
    font-size: 14px;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
    transition: 0.2s;
}

.pulse-map-btn:hover {
    transform: translateY(-2px);
    background: #667eea;
}

/* المودال */
.pulse-map-modal {
    position: fixed;
    inset: 0;
    background: rgba(15,23,42,0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9998;
}

.pulse-map-modal.active {
    display: flex;
}

.pulse-map-wrap {
    width: min(1200px, 95vw);
    height: min(700px, 90vh);
    background: #667eea;
    border-radius: 15px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.pulse-map-header {
    padding: 12px 16px;
    background: linear-gradient(90deg, #b91c1c, #f97316, #22c55e, #0ea5e9);
    color: #fff;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.pulse-map-close {
    background: rgba(255,255,255,0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

#pulse-map-container {
    width: 100%;
    height: 100%;
}
/* نافذة الخريطة */
.pulse-map-modal {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.75);
    display: none; /* pulse.js راح يغيرها */
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.pulse-map-wrap {
    background: #0b1120;
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(15, 23, 42, 0.8);
    width: 95%;
    max-width: 1200px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(148, 163, 184, 0.4);
}

.pulse-map-header {
    padding: 12px 18px;
    background: radial-gradient(circle at top left, #22c55e 0, #0f172a 45%, #020617 100%);
    color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.pulse-map-header h3 {
    margin: 0;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    gap: 8px;
}

.pulse-map-close {
    border: none;
    background: transparent;
    color: #e5e7eb;
    font-size: 1.4rem;
    cursor: pointer;
}

.pulse-map-body {
    display: flex;
    height: 100%;
    min-height: 400px;
}

.pulse-map-sidebar {
    width: 28%;
    min-width: 260px;
    max-width: 320px;
    background: linear-gradient(to bottom, #020617, #020617, #111827);
    border-left: 1px solid rgba(30, 64, 175, 0.5);
    padding: 14px 16px;
    color: #e5e7eb;
    font-size: 0.9rem;
    overflow-y: auto;
}

.pulse-map-sidebar h4 {
    margin-top: 0;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.pulse-map-sidebar .muted {
    color: #9ca3af;
    font-size: 0.85rem;
}

.pulse-map-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: radial-gradient(circle at top, #0f172a, #020617 55%, #000 100%);
}

.pulse-map-toolbar {
    padding: 8px 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    background: rgba(15, 23, 42, 0.9);
    border-bottom: 1px solid rgba(55, 65, 81, 0.7);
}

.toolbar-group {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #e5e7eb;
    font-size: 0.85rem;
}

.toolbar-group select {
    background: #020617;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.7);
    padding: 4px 10px;
    color: #e5e7eb;
    font-size: 0.8rem;
    outline: none;
}


/* حاوية الخريطة */
#pulse-map-container {
    flex: 1;
    min-height: 360px;
}

/* الزر العائم */
.pulse-map-btn {
    position: fixed;
    bottom: 18px;
    left: 18px;
    z-index: 9000;
    background: linear-gradient(to right, #22c55e, #16a34a);
    color: #764ba2;
    padding: 8px 14px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(22, 163, 74, 0.55);
}

/* مؤشرات ملوّنة (DivIcon) */
.pulse-marker {
    width: 16px;
    height: 16px;
    border-radius: 999px;
    border: 2px solid #f9fafb;
    box-shadow: 0 0 0 4px rgba(15, 23, 42, 0.7);
}

.pulse-marker-red    { background: #ef4444; }
.pulse-marker-orange { background: #f97316; }
.pulse-marker-blue   { background: #3b82f6; }
.pulse-marker-green  { background: #22c55e; }
.pulse-marker-yellow { background: #eab308; }
.pulse-marker-purple { background: #a855f7; }
.pulse-marker-black  { background: #020617; }

/* وميض للأحداث الخطيرة */
.pulse-ring {
    animation: pulse-ring 1.4s infinite;
    border-radius: 999px;
    background: rgba(239, 68, 68, 0.35);
}

@keyframes pulse-ring {
    0%   { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.8); opacity: 0; }
}

