/**
 * Estilos para el indicador de conexión
 */

/* Indicador de estado en esquina superior derecha */
.connection-status {
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.connection-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
}

.connection-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

/* Estado Online */
.connection-badge.online {
    background: #10b981;
    color: white;
}

.connection-badge.online .connection-dot {
    background: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
    animation: pulse-online 2s infinite;
}

/* Estado Offline */
.connection-badge.offline {
    background: #ef4444;
    color: white;
}

.connection-badge.offline .connection-dot {
    background: white;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
    animation: pulse-offline 1s infinite;
}

/* Punto indicador */
.connection-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Texto del estado */
.connection-text {
    font-size: 12px;
    letter-spacing: 0.3px;
}

/* Animaciones */
@keyframes pulse-online {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

@keyframes pulse-offline {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
}

/* Notificación temporal */
.connection-notification {
    position: fixed;
    top: 60px;
    right: 10px;
    z-index: 999998;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.connection-notification.show {
    transform: translateX(0);
    opacity: 1;
}

.connection-notification.success {
    background: #10b981;
    color: white;
}

.connection-notification.warning {
    background: #ef4444;
    color: white;
}

/* Responsive */
@media (max-width: 768px) {
    .connection-status {
        top: 8px;
        right: 8px;
    }
    
    .connection-badge {
        padding: 6px 12px;
        font-size: 12px;
    }
    
    .connection-dot {
        width: 8px;
        height: 8px;
    }
    
    .connection-text {
        font-size: 11px;
    }
    
    .connection-notification {
        top: 50px;
        right: 8px;
        font-size: 13px;
        padding: 10px 16px;
    }
}

/* Modo compacto (solo punto) para pantallas muy pequeñas */
@media (max-width: 480px) {
    .connection-text {
        display: none;
    }
    
    .connection-badge {
        padding: 8px;
        gap: 0;
        border-radius: 50%;
        width: 32px;
        height: 32px;
        justify-content: center;
    }
    
    .connection-dot {
        width: 12px;
        height: 12px;
    }
}
