/* Styles pour le système d'alertes */
.alert-history-container {
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    background-color: rgba(0, 0, 0, 0.2);
    border-radius: 5px;
}

/* Toggle des alertes dans la navbar */
.custom-switch {
    margin-left: 10px;
}

.custom-switch .custom-control-input:checked ~ .custom-control-label::before {
    background-color: #28a745;
    border-color: #28a745;
}

.custom-switch .custom-control-input:not(:checked) ~ .custom-control-label::before {
    background-color: #dc3545;
    border-color: #dc3545;
}

/* Animation pour les alertes */
@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 0, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0);
    }
}

.alert-active {
    animation: pulse 2s infinite;
}

/* Modal d'alerte */
.modal-content.alert-modal {
    background-color: #1a1a1a;
    color: white;
    border: 2px solid #ff6b6b;
}

.modal-header.alert-header {
    background-color: #ff6b6b;
    color: white;
    border-bottom: 1px solid #ff5252;
}

/* Configuration des alertes */
.alert-config-card {
    background-color: rgba(52, 58, 64, 0.9);
    border: 1px solid #445;
}

/* Audio element for alerts - ensure it's accessible but hidden */
#alert-audio-element {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
    /* Ensure audio can still play even when hidden */
    display: block !important;
}