/* Animations for the dashboard */

/* Pulsing animation for problematic branches */
@keyframes pulse {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0.7);
    }
    
    70% {
        transform: scale(1);
        box-shadow: 0 0 0 10px rgba(231, 76, 60, 0);
    }
    
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(231, 76, 60, 0);
    }
}

.pulse-animation {
    animation: pulse 2s infinite;
}

/* Custom marker classes for Leaflet map */
.map-marker {
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    box-shadow: 0 0 0 3px white, 0 0 5px 3px rgba(0, 0, 0, 0.3);
    font-size: 12px;
}

.marker-green {
    background-color: #2ecc71;
}

.marker-orange {
    background-color: #f39c12;
}

.marker-red {
    background-color: #e74c3c;
}

/* Hotspot animation for problematic branches */
.hotspot-ring {
    position: absolute;
    border-radius: 50%;
    animation: hotspot 3s ease-out infinite;
    /* Center the ring by positioning it relative to its container */
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes hotspot {
    0% {
        width: 20px;
        height: 20px;
        opacity: 0.8;
    }
    100% {
        width: 60px;
        height: 60px;
        opacity: 0;
    }
}

/* Transition effects */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Hover effects for interactive elements */
.hover-effect {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hover-effect:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Loading spinner */
.spinner {
    width: 40px;
    height: 40px;
    margin: 100px auto;
    background-color: var(--primary-color);
    border-radius: 100%;
    animation: sk-scaleout 1.0s infinite ease-in-out;
}

@keyframes sk-scaleout {
    0% { 
        transform: scale(0);
    } 
    100% {
        transform: scale(1.0);
        opacity: 0;
    }
}
