/* =========================================================================
   SISTEMA RECINTO V3 - ESTILOS DEL MONITOR DE CONECTIVIDAD A INTERNET
   ========================================================================= */

/* Barra Flotante Superior de Alerta */
#recinto-network-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    width: 100%;
    z-index: 9999999;
    padding: 10px 16px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    text-align: center;
    color: #ffffff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
    transform: translateY(-100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

#recinto-network-banner.banner-visible {
    transform: translateY(0);
}

/* Modo Desconectado */
#recinto-network-banner.banner-offline {
    background: linear-gradient(135deg, #dc2626 0%, #991b1b 100%);
    border-bottom: 2px solid #f87171;
}

/* Modo Conectado / Restablecido */
#recinto-network-banner.banner-online {
    background: linear-gradient(135deg, #16a34a 0%, #15803d 100%);
    border-bottom: 2px solid #86efac;
}

#recinto-network-banner .banner-icon {
    font-size: 1.25rem;
    display: inline-flex;
    align-items: center;
    animation: icon-bounce 1s infinite alternate ease-in-out;
}

#recinto-network-banner .banner-text {
    letter-spacing: 0.02em;
}

#recinto-network-banner .banner-retry-btn {
    background: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 4px;
    padding: 2px 10px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease;
    margin-left: 8px;
}

#recinto-network-banner .banner-retry-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

/* Badge / Indicador en Navbar */
.recinto-conn-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 8px;
    border-radius: 20px;
    font-size: 0.76rem;
    font-weight: 700;
    user-select: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.recinto-conn-badge.conn-online {
    background: rgba(34, 197, 94, 0.18);
    color: #4ade80;
    border: 1px solid rgba(74, 222, 128, 0.35);
}

.recinto-conn-badge.conn-offline {
    background: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
    border: 1px solid rgba(248, 113, 113, 0.6);
    animation: pulse-badge 1.5s infinite;
}

.recinto-conn-badge .conn-icon-svg {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.recinto-conn-badge .conn-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    display: inline-block;
}

.recinto-conn-badge.conn-online .conn-dot {
    background-color: #22c55e;
    box-shadow: 0 0 7px #22c55e, 0 0 2px #4ade80;
}

.recinto-conn-badge.conn-offline .conn-dot {
    background-color: #ef4444;
    box-shadow: 0 0 7px #ef4444;
    animation: blink-dot 0.9s infinite alternate;
}

/* Animaciones */
@keyframes blink-dot {
    from { opacity: 0.3; transform: scale(0.85); }
    to { opacity: 1; transform: scale(1.15); }
}

@keyframes pulse-badge {
    0% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
    100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0); }
}

@keyframes icon-bounce {
    from { transform: translateY(0); }
    to { transform: translateY(-2px); }
}