/* ============================================================================
   EASTERN SOJOURNER — SAFETY HUB STYLES
   Extends the main theme with safety-specific UI components
   ============================================================================ */

/* ── Hero ─────────────────────────────────────────────────────────────────── */
.safety-hero {
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 40%, #0f172a 100%);
    position: relative;
}

.hero-particles {
    background-image:
        radial-gradient(2px 2px at 20% 30%, rgba(99, 102, 241, 0.3), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(139, 92, 246, 0.2), transparent),
        radial-gradient(1px 1px at 60% 20%, rgba(6, 182, 212, 0.3), transparent),
        radial-gradient(1px 1px at 80% 50%, rgba(99, 102, 241, 0.2), transparent),
        radial-gradient(2px 2px at 10% 80%, rgba(139, 92, 246, 0.2), transparent),
        radial-gradient(1px 1px at 90% 10%, rgba(6, 182, 212, 0.15), transparent),
        radial-gradient(1px 1px at 50% 50%, rgba(99, 102, 241, 0.1), transparent);
    animation: particleFloat 20s ease-in-out infinite;
}

@keyframes particleFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    25% { transform: translate(-10px, 15px) scale(1.02); }
    50% { transform: translate(5px, -10px) scale(0.98); }
    75% { transform: translate(10px, 5px) scale(1.01); }
}

/* ── Dashboard Map ────────────────────────────────────────────────────────── */
.dashboard-map {
    height: 450px;
    width: 100%;
    background: #1a1a2e;
    border-radius: 0 0 0.75rem 0.75rem;
}

@media (max-width: 768px) {
    .dashboard-map {
        height: 300px;
    }
}

/* Fix Leaflet controls for dark mode */
.leaflet-control-zoom a {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border-color: #334155 !important;
}

.leaflet-control-zoom a:hover {
    background: #334155 !important;
}

.leaflet-control-attribution {
    background: rgba(30, 41, 59, 0.8) !important;
    color: #64748b !important;
    font-size: 10px !important;
}

.leaflet-control-attribution a {
    color: #6366f1 !important;
}

.leaflet-popup-content-wrapper {
    background: #1e293b !important;
    color: #e2e8f0 !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5) !important;
}

.leaflet-popup-tip {
    background: #1e293b !important;
}

.leaflet-popup-content {
    margin: 12px 16px !important;
}

.leaflet-popup-content h3 {
    color: #e2e8f0 !important;
}

.leaflet-popup-content p {
    color: #94a3b8 !important;
}

/* ── SOS Button ───────────────────────────────────────────────────────────── */
.sos-btn {
    background: linear-gradient(135deg, #ef4444, #dc2626, #b91c1c);
    box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
    animation: sosPulse 2s infinite;
}

.sos-btn:hover {
    box-shadow: 0 0 40px rgba(239, 68, 68, 0.6);
}

.sos-btn:disabled {
    opacity: 0.6;
    animation: none;
}

@keyframes sosPulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(239, 68, 68, 0.3);
    }
    50% {
        box-shadow: 0 0 35px rgba(239, 68, 68, 0.5);
    }
}

/* ── QR Code Spinner ──────────────────────────────────────────────────────── */
.qr-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ── Verification Success Animation ───────────────────────────────────────── */
.verify-success-animation {
    animation: verifyPop 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

@keyframes verifyPop {
    0% { transform: scale(0); opacity: 0; }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); opacity: 1; }
}

/* ── Status Indicators ────────────────────────────────────────────────────── */
.status-safe {
    color: #22c55e;
    text-shadow: 0 0 8px rgba(34, 197, 94, 0.3);
}

.status-caution {
    color: #f59e0b;
    text-shadow: 0 0 8px rgba(245, 158, 11, 0.3);
}

.status-danger {
    color: #ef4444;
    text-shadow: 0 0 8px rgba(239, 68, 68, 0.3);
}

/* ── Custom Scrollbar ─────────────────────────────────────────────────────── */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: transparent;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #334155;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #475569;
}

/* ── Tourist Marker ───────────────────────────────────────────────────────── */
.tourist-marker {
    filter: drop-shadow(0 0 6px rgba(99, 102, 241, 0.5));
}

/* ── Reduced Motion ───────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
    .hero-particles { animation: none; }
    .qr-spinner { animation: none; }
    .sos-btn { animation: none; }
    .verify-success-animation { animation: none; }
}
