.connectivity-alert {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 99999; /* Extremely high z-index */
    width: 90%;
    max-width: 600px;
    background-color: #dc3545; /* Bootstrap danger color */
    color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    padding: 12px 20px;
    animation: slideDown 0.5s ease-out;
    display: none; /* Controlled by JS */
}

.connectivity-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
    font-size: 1.1rem;
}

.connectivity-icon-fixed {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 60px;
    height: 60px;
    background-color: #dc3545;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 99999; /* Extremely high z-index */
    cursor: help;
    animation: pulse 2s infinite;
    display: none; /* Controlled by JS */
}

/* Online indicator styles */
.connectivity-online-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #198754; /* Bootstrap success color */
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    z-index: 99999;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    animation: fadeInOut 4s forwards;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
}

@keyframes slideDown {
    from {
        top: -100px;
        opacity: 0;
    }
    to {
        top: 20px;
        opacity: 1;
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 15px rgba(220, 53, 69, 0);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translate(-50%, 20px); }
    10% { opacity: 1; transform: translate(-50%, 0); }
    80% { opacity: 1; transform: translate(-50%, 0); }
    100% { opacity: 0; transform: translate(-50%, -20px); visibility: hidden; }
}

/* Connectivity Toast Styles */
.connectivity-toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    padding: 10px 20px;
    border-radius: 25px;
    z-index: 99999;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease-in-out;
    opacity: 0;
    visibility: hidden;
}

.connectivity-toast.show {
    opacity: 1;
    visibility: visible;
    bottom: 30px; /* Slight lift animation */
}

.connectivity-toast.online {
    background-color: #198754; /* Bootstrap success */
    color: white;
}

.connectivity-toast.offline {
    background-color: #dc3545; /* Bootstrap danger */
    color: white;
    animation: pulse-border 2s infinite;
}

@keyframes pulse-border {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(220, 53, 69, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}